System.IO.DirectoryInfo: Method Members

The methods of System.IO.DirectoryInfo are listed below. For a list of all members, see the DirectoryInfo Members list.

See Also: Inherited members from System.IO.FileSystemInfo

Public Methods

Create()

Creates a directory.

Create(System.Security.AccessControl.DirectorySecurity)

Creates a directory using a System.Security.AccessControl.DirectorySecurity object.

CreateSubdirectory(string) : DirectoryInfo

Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the System.IO.DirectoryInfo class.

CreateSubdirectory(string, System.Security.AccessControl.DirectorySecurity) : DirectoryInfo

Creates a subdirectory or subdirectories on the specified path with the specified security. The specified path can be relative to this instance of the System.IO.DirectoryInfo class.

override
Delete()

Deletes this System.IO.DirectoryInfo if it is empty.

Delete(bool)

Deletes this instance of a System.IO.DirectoryInfo, specifying whether to delete subdirectories and files.

EnumerateDirectories() : IEnumerable<DirectoryInfo>

Returns an enumerable collection of directory information in the current directory.

EnumerateDirectories(string) : IEnumerable<DirectoryInfo>

Returns an enumerable collection of directory information that matches a specified search pattern.

EnumerateDirectories(string, SearchOption) : IEnumerable<DirectoryInfo>

Returns an enumerable collection of directory information that matches a specified search pattern and search subdirectory option.

EnumerateFiles() : IEnumerable<FileInfo>

Returns an enumerable collection of file information in the current directory.

EnumerateFiles(string) : IEnumerable<FileInfo>

Returns an enumerable collection of file information that matches a search pattern.

EnumerateFiles(string, SearchOption) : IEnumerable<FileInfo>

Returns an enumerable collection of file information that matches a specified search pattern and search subdirectory option.

EnumerateFileSystemInfos() : IEnumerable<FileSystemInfo>

Returns an enumerable collection of file system information in the current directory.

EnumerateFileSystemInfos(string) : IEnumerable<FileSystemInfo>

Returns an enumerable collection of file system information that matches a specified search pattern.

EnumerateFileSystemInfos(string, SearchOption) : IEnumerable<FileSystemInfo>

Returns an enumerable collection of file system information that matches a specified search pattern and search subdirectory option.

GetAccessControl() : System.Security.AccessControl.DirectorySecurity

Gets a System.Security.AccessControl.DirectorySecurity object that encapsulates the access control list (ACL) entries for the directory described by the current System.IO.DirectoryInfo object.

GetAccessControl(System.Security.AccessControl.AccessControlSections) : System.Security.AccessControl.DirectorySecurity

Gets a System.Security.AccessControl.DirectorySecurity object that encapsulates the specified type of access control list (ACL) entries for the directory described by the current System.IO.DirectoryInfo object.

GetDirectories() : DirectoryInfo[]

Returns the subdirectories of the current directory.

GetDirectories(string) : DirectoryInfo[]

Returns an array of directories in the current System.IO.DirectoryInfo matching the given search criteria.

GetDirectories(string, SearchOption) : DirectoryInfo[]

Returns an array of directories in the current System.IO.DirectoryInfo matching the given search criteria and using a value to determine whether to search subdirectories.

GetFiles() : FileInfo[]

Returns a file list from the current directory.

GetFiles(string) : FileInfo[]

Returns a file list from the current directory matching the given search pattern.

GetFiles(string, SearchOption) : FileInfo[]

Returns a file list from the current directory matching the given search pattern and using a value to determine whether to search subdirectories.

GetFileSystemInfos() : FileSystemInfo[]

Returns an array of strongly typed System.IO.FileSystemInfo entries representing all the files and subdirectories in a directory.

GetFileSystemInfos(string) : FileSystemInfo[]

Retrieves an array of strongly typed System.IO.FileSystemInfo objects representing the files and subdirectories that match the specified search criteria.

GetFileSystemInfos(string, SearchOption) : FileSystemInfo[]

Retrieves an array of System.IO.FileSystemInfo objects that represent the files and subdirectories matching the specified search criteria.

MoveTo(string)

Moves a System.IO.DirectoryInfo instance and its contents to a new path.

SetAccessControl(System.Security.AccessControl.DirectorySecurity)

Applies access control list (ACL) entries described by a System.Security.AccessControl.DirectorySecurity object to the directory described by the current System.IO.DirectoryInfo object.

override
ToString() : string

Returns the original path that was passed by the user.