Struct 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.

struct VolumeInfo ;

Constructors

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

Properties

NameTypeDescription
bytesAvailable[get] longFree space available for the current user. This is what most tools and GUI applications show as free space.
bytesFree[get] longFree space in a volume
bytesTotal[get] longTotal volume size.
device[get] stringDevice string, e.g. /dev/sda on Linux and volume guid on Windows.
isValid[get] boolWhether the object is valid (specified path exists).
label[get] stringName 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[get] stringRoot path of file system (mountpoint of partition).
readOnly[get] boolWhether the referenced filesystem is marked as readonly.
ready[get] boolWhether the filesystem is ready for work.
type[get] stringFile system type, e.g. ext4 on Linux or NTFS on Windows.

Methods

NameDescription
refresh Refresh cached info.