April 2014
Intermediate to advanced
960 pages
22h 9m
English
This appendix describes the .NET Framework’s filesystem classes. It also summarizes methods you can use to manage the recycle bin.
The System.IO namespace provides several classes for working with the filesystem. The following sections describe the properties, methods, and events provided by these classes.
The Directory class provides static methods for working with directories. The following table summarizes those static methods.
| Method | Purpose |
CreateDirectory | Creates a directory and any missing directories along its path. |
Delete | Deletes a directory and its contents. It can recursively delete all subdirectories. |
Exists | Returns true if the path points to an existing directory. |
GetCreationTime | Returns a directory’s creation date and time. |
GetCreationTimeUtc | Returns a directory’s creation date and time in Coordinated Universal Time (UTC). |
GetCurrentDirectory | Returns the application’s current working directory. |
GetDirectories | Returns an array of strings holding the fully qualified names of a directory’s subdirectories. |
GetDirectoryRoot | Returns the directory root for a path, which need not exist (for example, C:\). |
GetFiles | Returns an array of strings holding the fully qualified names of a directory’s files. |
GetFileSystemEntries | Returns an array of strings holding the fully qualified names of a directory’s files and subdirectories. |
GetLastAccessTime | Returns a directory’s last access date and time. |
GetLastAccessTimeUtc |
Read now
Unlock full access