DirectoryInfo Class |
Namespace: System.IO
[SerializableAttribute] public sealed class DirectoryInfo : FileSystemInfo
The DirectoryInfo type exposes the following members.
Name | Description | |
---|---|---|
Create | Creates a directory. | |
Create(DirectorySecurity) | Creates a directory using a DirectorySecurity object. | |
Delete | Deletes a file or directory. (Inherited from FileSystemInfo.) | |
Equals(Object) | (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Refresh | Refreshes the state of the object. (Inherited from FileSystemInfo.) | |
ToString | Returns the original path that was passed by the user. (Overrides ObjectToString.) |
Name | Description | |
---|---|---|
Exists | Gets a value indicating whether the file or directory exists. (Inherited from FileSystemInfo.) | |
Extension | Gets the string representing the extension part of the file. (Inherited from FileSystemInfo.) | |
FullName | Gets the full path of the directory or file. (Inherited from FileSystemInfo.) | |
Name | For files, gets the name of the file. For directories, gets the name of the last directory in the hierarchy if a hierarchy exists. Otherwise, the Name property gets the name of the directory. (Inherited from FileSystemInfo.) |