This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Directory Methods
The methods of the Directory class are listed below. For a complete list of Directory class members, see the Directory Members topic.
Public:
Combine |
Combines two file paths. |
CreateDirectories |
Creates all directories specified by path. |
CreateDirectory |
Creates the directory as specified by path. |
CreateFile |
Creates a file in a specified path and opens it with read/write permission. |
CreateSubdirectories |
Creates subdirectories on the specified path. |
CreateSubdirectory |
Creates a subdirectory of the specified directory. |
Delete |
Overloaded. Deletes a directory and its contents from a path. |
DirectoryExists |
Tests if the given path refers to an existing directory on disk. |
Equals (inherited from Object) |
Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality). |
GetDirectories |
Overloaded. Returns an array of Directories in the current directory. |
GetDirectoriesInDirectory |
Overloaded. Returns an array of Directories in the current directory. |
GetDirectoryRoot |
Returns the root portion of the specified path. |
GetFiles |
Overloaded. Returns a file list from the current directory. |
GetFilesInDirectory |
Overloaded. Retrieves an array of files in the specified directory. |
GetFileSystemEntries |
Overloaded. Retrieves an array of strongly typed FileSystemEntry objects. |
GetFileSystemEntriesInDirectory |
Overloaded. Returns an array of strongly typed FileSystemEntry entries in the path. |
GetFullPath |
Expands the specified path to a fully qualified path. |
GetHashCode (inherited from Object) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetLogicalDrives |
Retrieves the names of the logical drives on this machine in the form "C:\". |
GetParent |
Retrieves the parent directory of the specified path. |
GetType (inherited from Object) |
Gets the Type of the Object. |
IsDirectoryRooted |
Determines whether the specified path refers to a root. |
Move |
Moves a directory and its contents to a new path. |
MoveTo |
Moves a directory and its contents to a new path. |
Refresh |
Refreshes the state of the object. |
ToString |
Returns the fully qualified path. |
Protected:
Finalize (inherited from Object) |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere. |
MemberwiseClone (inherited from Object) |
Creates a shallow copy of the current Object. |
See Also
Directory Class | System.IO Namespace