DriveInfo Class
.NET Framework 4.5
Provides access to information on a drive.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
The DriveInfo type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AvailableFreeSpace | Indicates the amount of available free space on a drive. |
![]() | DriveFormat | Gets the name of the file system, such as NTFS or FAT32. |
![]() | DriveType | Gets the drive type. |
![]() | IsReady | Gets a value indicating whether a drive is ready. |
![]() | Name | Gets the name of a drive. |
![]() | RootDirectory | Gets the root directory of a drive. |
![]() | TotalFreeSpace | Gets the total amount of free space available on a drive. |
![]() | TotalSize | Gets the total size of storage space on a drive. |
![]() | VolumeLabel | Gets or sets the volume label of a drive. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() ![]() | GetDrives | Retrieves the drive names of all logical drives on a computer. |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | ToString | Returns a drive name as a string. (Overrides Object::ToString().) |
| Name | Description | |
|---|---|---|
![]() ![]() | ISerializable::GetObjectData | Populates a SerializationInfo object with the data needed to serialize the target object. |
- FileIOPermission
for accessing directory information. The class constructor requires this permission. Associated enumeration: PathDiscovery.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.gif?cs-save-lang=1&cs-lang=cpp)
.gif?cs-save-lang=1&cs-lang=cpp)
.gif?cs-save-lang=1&cs-lang=cpp)
.gif?cs-save-lang=1&cs-lang=cpp)
.gif?cs-save-lang=1&cs-lang=cpp)