Provides access to information on a drive.
| C# | Visual Basic |
public sealed class DriveInfo
Public NotInheritable Class DriveInfo
| All Members | Constructors | Methods | Properties | ||
| Icon | Member | Description |
|---|---|---|
| DriveInfo(String) |
Provides access to information on the specified drive.
| |
| AvailableFreeSpace |
Indicates the amount of available free space on a drive.
| |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetDrives()()() |
Retrieves the drive names of all logical drives on a device.
| |
| GetHashCode()()() | Serves as a hash function for a particular type. GetHashCode()()() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) | |
| GetType()()() | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| RootDirectory |
Gets the root directory of a drive.
| |
| ToString()()() |
Returns a drive name as a string.
(Overrides Object.ToString()()().) | |
| TotalFreeSpace |
Gets the total amount of free space available on a drive.
| |
| TotalSize |
Gets the total size of storage space on a drive.
|
This class models a drive and provides methods and properties to query for drive information.
Use DriveInfo to determine what drives are available, and the capacity and available free space on the drive.
| Object | |
| DriveInfo | |
[!:System.IO.DriveInfo]