DriveInfo::TotalFreeSpace Property
.NET Framework (current version)
Gets the total amount of free space available on a drive, in bytes.
Assembly: mscorlib (in mscorlib.dll)
| Exception | Condition |
|---|---|
| UnauthorizedAccessException | Access to the drive information is denied. |
| DriveNotFoundException | The drive is not mapped or does not exist. |
| IOException | An I/O error occurred (for example, a disk error or a drive was not ready). |
This property indicates the total amount of free space available on the drive, not just what is available to the current user.
.NET Framework
Available since 2.0
Available since 2.0
Show: