Directory
The Directory class can be used to manipulate directories. It provides a set of static methods for creating, moving, renaming, and deleting directories.
静态方法
Directory.Exists ( path : string ) : boolean |
| Check if the specified directory exists. |
Directory.Create ( path : string ) : boolean |
| Create a directory at the specified path. |
Directory.GetParent ( path : string ) : string |
| Returns the name of the parent folder of the specified directory. |
Directory.IsEmpty ( path : string ) : boolean |
| Determines whether the specified path is empty. |
Directory.Delete ( path : string ) : boolean |
| Deletes the directory at the specified path. |
Directory.GetFiles ( path : string ) : string [] |
| Get all file paths under the specified directory path. This method does not recursively retrieve files in subdirectories. |
Directory.GetDirectories ( path : string ) : string [] |
| Get all directory paths under the specified directory path. This method does not recursively retrieve directories under subdirectories. |
Directory.Copy ( src : string , dst : string ) : boolean |
| Copy a folder to a specified path, including all files within it. |
