The DriveInfo class provides information about drives and/or volumes mounted on a system.
The amount of space available to the current user, in bytes.
The getAvailableSpace() method returns the number of bytes available on the volume to the current user. This can differ from the total amount of space available if a quota system is active.
An array of DriveInfo objects
Calling DriveInfo.getDrives() returns an array of DriveInfo objects which represent all available mounted volumes on the system.
The amount of free space, in bytes.
The getFreeSpace() method returns the number of free bytes on the volume.
A string containing the volume name
The getName() method returns the name of the volume. The exact format of this string depends on the platform under which the program is running. For example, on WIN32 systems, a volume name can be "C:\", "D:\", etc.
The total size of a volume, in bytes.
The getTotalSize() method returns the total storage capacity of a volume.