VolumeInfo

Represents a filesystem volume. Provides information about mountpoint, filesystem type and storage size. All values except for VolumeInfo.path are retrieved on the first demand and then getting cached. Use VolumeInfo.refresh to refresh info.

Constructors

this
this(string path)

Construct an object that gives information about volume on which the provided path is located.

Members

Functions

refresh
void refresh()

Refresh cached info.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

bytesAvailable
long bytesAvailable [@property getter]

Free space available for the current user. This is what most tools and GUI applications show as free space.

bytesFree
long bytesFree [@property getter]

Free space in a volume Note: This is size of free space in a volume, but actual free space available for the current user may be smaller.

bytesTotal
long bytesTotal [@property getter]

Total volume size.

device
string device [@property getter]

Device string, e.g. /dev/sda on Linux and volume guid on Windows.

isValid
bool isValid [@property getter]

Whether the object is valid (specified path exists).

label
string label [@property getter]

Name of volume. Empty string if volume label could not be retrieved. In case the label is empty you may consider using the base name of volume path as a display name, possible in combination with type.

path
string path [@property getter]

Root path of file system (mountpoint of partition).

readOnly
bool readOnly [@property getter]

Whether the referenced filesystem is marked as readonly.

ready
bool ready [@property getter]

Whether the filesystem is ready for work.

type
string type [@property getter]

File system type, e.g. ext4 on Linux or NTFS on Windows.

Meta