The Directory object allows you to access directories on disk. This object is always available in a form of predefined Directory global variable.
// create directory structure Directory.Create("c:\somedir\otherdir"); |
Create | Creates a new directory or directory tree. |
Delete | Deletes a directory. |
GetFiles | Returns list of files stored in a given directory. |
GetDirectories | Returns list of sub-directories stored in a given directory. |
GetDrives | Returns list of present disk drives. |
Type (read only) | Returns always "directory" |
PathSeparator (read only) | Returns the standard path separator character. |
CurrentDirectory | Gets or sets the current working directory for an application. |
TempDirectory (read only) | Returns Windows temporary directory. |
Creates a new directory or directory tree.
Returns true if the directory tree has been successfuly created.
Deletes a directory.
Returns true if the directory has been successfuly deleted.
This method only deletes one directory, not the entire directory tree specified in the Path parameter.
Returns list of files stored in a given directory.
Returns an Array object containing filenames of all the files stored in a given directory.
Returns list of sub-directories stored in a given directory.
Returns an Array object containing names of all the sub-directories stored in a given directory.
Returns list of present disk drives.
Returns an Array object containing names of all the disk drives, such as "c:\".