August 2012
Intermediate to advanced
840 pages
22h 41m
English
The My.Computer.FileSystem object provides tools for working with drives, directories, and files. The following table summarizes this object’s properties.
| PROPERTY | DESCRIPTION |
| CurrentDirectory | Gets or sets the fully qualified path to the application’s current directory. |
| Drives | Returns a read-only collection of DriveInfo objects describing the system’s drives. |
| SpecialDirectories | Returns a SpecialDirectoriesProxy object that has properties giving the locations of various special directories (such as the system’s temporary directory and the user’s MyDocuments directory). See the following section “My.Computer.FileSystem.SpecialDirectories” for more information. |
The following list describes the My.Computer.FileSystem object’s methods:
| METHOD | PURPOSE |
| CombinePath | Combines a base path with a relative path reference and returns a properly formatted fully qualified path. For example, the following code displays the name of the directory that is the parent of the application’s current directory: MessageBox.Show(My.Computer.FileSystem.CombinePath (My.Computer.FileSystem.CurrentDirectory(), ".."). |
| CopyDirectory | Copies a directory. Parameters indicate whether to overwrite existing files, whether to display a progress indicator, and what to do if the user presses Cancel during the operation. |
| CopyFile | Copies a file. Parameters indicate whether to overwrite existing files, whether to display a progress indicator, and what to do if the user presses ... |
Read now
Unlock full access