C# Class System.IO.Directory

Show file Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
CreateDirectory ( string path ) : System.IO.DirectoryInfo
Delete ( string path ) : void
Delete ( string path, bool recursive ) : void
EnumerateDirectories ( string path ) : System.Collections.Generic.IEnumerable
EnumerateDirectories ( string path, string searchPattern ) : System.Collections.Generic.IEnumerable
EnumerateDirectories ( string path, string searchPattern, System searchOption ) : System.Collections.Generic.IEnumerable
EnumerateFileSystemEntries ( string path ) : System.Collections.Generic.IEnumerable
EnumerateFileSystemEntries ( string path, string searchPattern ) : System.Collections.Generic.IEnumerable
EnumerateFileSystemEntries ( string path, string searchPattern, System searchOption ) : System.Collections.Generic.IEnumerable
EnumerateFiles ( string path ) : System.Collections.Generic.IEnumerable
EnumerateFiles ( string path, string searchPattern ) : System.Collections.Generic.IEnumerable
EnumerateFiles ( string path, string searchPattern, System searchOption ) : System.Collections.Generic.IEnumerable
Exists ( string path ) : bool
GetCreationTime ( string path ) : System.DateTime
GetCreationTimeUtc ( string path ) : System.DateTime
GetCurrentDirectory ( ) : string
GetDirectories ( string path ) : string[]
GetDirectories ( string path, string searchPattern ) : string[]
GetDirectories ( string path, string searchPattern, System searchOption ) : string[]
GetDirectoryRoot ( string path ) : string
GetFileSystemEntries ( string path ) : string[]
GetFileSystemEntries ( string path, string searchPattern ) : string[]
GetFileSystemEntries ( string path, string searchPattern, System searchOption ) : string[]
GetFiles ( string path ) : string[]
GetFiles ( string path, string searchPattern ) : string[]
GetFiles ( string path, string searchPattern, System searchOption ) : string[]
GetLastAccessTime ( string path ) : System.DateTime
GetLastAccessTimeUtc ( string path ) : System.DateTime
GetLastWriteTime ( string path ) : System.DateTime
GetLastWriteTimeUtc ( string path ) : System.DateTime
GetLogicalDrives ( ) : string[]
GetParent ( string path ) : System.IO.DirectoryInfo
Move ( string sourceDirName, string destDirName ) : void
SetCreationTime ( string path, System creationTime ) : void
SetCreationTimeUtc ( string path, System creationTimeUtc ) : void
SetCurrentDirectory ( string path ) : void
SetLastAccessTime ( string path, System lastAccessTime ) : void
SetLastAccessTimeUtc ( string path, System lastAccessTimeUtc ) : void
SetLastWriteTime ( string path, System lastWriteTime ) : void
SetLastWriteTimeUtc ( string path, System lastWriteTimeUtc ) : void

Method Details

CreateDirectory() public static method

public static CreateDirectory ( string path ) : System.IO.DirectoryInfo
path string
return System.IO.DirectoryInfo

Delete() public static method

public static Delete ( string path ) : void
path string
return void

Delete() public static method

public static Delete ( string path, bool recursive ) : void
path string
recursive bool
return void

EnumerateDirectories() public static method

public static EnumerateDirectories ( string path ) : System.Collections.Generic.IEnumerable
path string
return System.Collections.Generic.IEnumerable

EnumerateDirectories() public static method

public static EnumerateDirectories ( string path, string searchPattern ) : System.Collections.Generic.IEnumerable
path string
searchPattern string
return System.Collections.Generic.IEnumerable

EnumerateDirectories() public static method

public static EnumerateDirectories ( string path, string searchPattern, System searchOption ) : System.Collections.Generic.IEnumerable
path string
searchPattern string
searchOption System
return System.Collections.Generic.IEnumerable

EnumerateFileSystemEntries() public static method

public static EnumerateFileSystemEntries ( string path ) : System.Collections.Generic.IEnumerable
path string
return System.Collections.Generic.IEnumerable

EnumerateFileSystemEntries() public static method

public static EnumerateFileSystemEntries ( string path, string searchPattern ) : System.Collections.Generic.IEnumerable
path string
searchPattern string
return System.Collections.Generic.IEnumerable

EnumerateFileSystemEntries() public static method

public static EnumerateFileSystemEntries ( string path, string searchPattern, System searchOption ) : System.Collections.Generic.IEnumerable
path string
searchPattern string
searchOption System
return System.Collections.Generic.IEnumerable

EnumerateFiles() public static method

public static EnumerateFiles ( string path ) : System.Collections.Generic.IEnumerable
path string
return System.Collections.Generic.IEnumerable

EnumerateFiles() public static method

public static EnumerateFiles ( string path, string searchPattern ) : System.Collections.Generic.IEnumerable
path string
searchPattern string
return System.Collections.Generic.IEnumerable

EnumerateFiles() public static method

public static EnumerateFiles ( string path, string searchPattern, System searchOption ) : System.Collections.Generic.IEnumerable
path string
searchPattern string
searchOption System
return System.Collections.Generic.IEnumerable

Exists() public static method

public static Exists ( string path ) : bool
path string
return bool

GetCreationTime() public static method

public static GetCreationTime ( string path ) : System.DateTime
path string
return System.DateTime

GetCreationTimeUtc() public static method

public static GetCreationTimeUtc ( string path ) : System.DateTime
path string
return System.DateTime

GetCurrentDirectory() public static method

public static GetCurrentDirectory ( ) : string
return string

GetDirectories() public static method

public static GetDirectories ( string path ) : string[]
path string
return string[]

GetDirectories() public static method

public static GetDirectories ( string path, string searchPattern ) : string[]
path string
searchPattern string
return string[]

GetDirectories() public static method

public static GetDirectories ( string path, string searchPattern, System searchOption ) : string[]
path string
searchPattern string
searchOption System
return string[]

GetDirectoryRoot() public static method

public static GetDirectoryRoot ( string path ) : string
path string
return string

GetFileSystemEntries() public static method

public static GetFileSystemEntries ( string path ) : string[]
path string
return string[]

GetFileSystemEntries() public static method

public static GetFileSystemEntries ( string path, string searchPattern ) : string[]
path string
searchPattern string
return string[]

GetFileSystemEntries() public static method

public static GetFileSystemEntries ( string path, string searchPattern, System searchOption ) : string[]
path string
searchPattern string
searchOption System
return string[]

GetFiles() public static method

public static GetFiles ( string path ) : string[]
path string
return string[]

GetFiles() public static method

public static GetFiles ( string path, string searchPattern ) : string[]
path string
searchPattern string
return string[]

GetFiles() public static method

public static GetFiles ( string path, string searchPattern, System searchOption ) : string[]
path string
searchPattern string
searchOption System
return string[]

GetLastAccessTime() public static method

public static GetLastAccessTime ( string path ) : System.DateTime
path string
return System.DateTime

GetLastAccessTimeUtc() public static method

public static GetLastAccessTimeUtc ( string path ) : System.DateTime
path string
return System.DateTime

GetLastWriteTime() public static method

public static GetLastWriteTime ( string path ) : System.DateTime
path string
return System.DateTime

GetLastWriteTimeUtc() public static method

public static GetLastWriteTimeUtc ( string path ) : System.DateTime
path string
return System.DateTime

GetLogicalDrives() public static method

public static GetLogicalDrives ( ) : string[]
return string[]

GetParent() public static method

public static GetParent ( string path ) : System.IO.DirectoryInfo
path string
return System.IO.DirectoryInfo

Move() public static method

public static Move ( string sourceDirName, string destDirName ) : void
sourceDirName string
destDirName string
return void

SetCreationTime() public static method

public static SetCreationTime ( string path, System creationTime ) : void
path string
creationTime System
return void

SetCreationTimeUtc() public static method

public static SetCreationTimeUtc ( string path, System creationTimeUtc ) : void
path string
creationTimeUtc System
return void

SetCurrentDirectory() public static method

public static SetCurrentDirectory ( string path ) : void
path string
return void

SetLastAccessTime() public static method

public static SetLastAccessTime ( string path, System lastAccessTime ) : void
path string
lastAccessTime System
return void

SetLastAccessTimeUtc() public static method

public static SetLastAccessTimeUtc ( string path, System lastAccessTimeUtc ) : void
path string
lastAccessTimeUtc System
return void

SetLastWriteTime() public static method

public static SetLastWriteTime ( string path, System lastWriteTime ) : void
path string
lastWriteTime System
return void

SetLastWriteTimeUtc() public static method

public static SetLastWriteTimeUtc ( string path, System lastWriteTimeUtc ) : void
path string
lastWriteTimeUtc System
return void