Queries metadata for file system volumes.
The StorageDevice class returns metadata for mounted file system volumes. Set Volume before initialisation to identify the volume to query. If the volume name cannot be resolved, initialisation will fail.
After initialisation, the read-only fields describe the resolved volume. Values that depend on host or device support can remain unavailable; unknown byte counts are reported as -1, and DeviceID is empty if no identifier is available.
The StorageDevice class consists of the following fields:
Access | Name | Type | Comment | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BytesFree | INT64 | Amount of storage space available to the current user, measured in bytes. | |||||||||||||||||||||||||||||||||||||||||||
The available storage space reported by the host file system is indicated in this field. A value of | |||||||||||||||||||||||||||||||||||||||||||||
| BytesUsed | INT64 | Amount of storage space in use, measured in bytes. | |||||||||||||||||||||||||||||||||||||||||||
The amount of storage space used on the volume is indicated in this field. A value of Please note that storage usage is typically measured in terms of blocks. For instance, a block size of 512 bytes will mean that this field is a multiple of 512. Two files of 1 byte each on such a file system would take up 1024 bytes of space and not 2. | |||||||||||||||||||||||||||||||||||||||||||||
| DeviceFlags | DEVICE | These read-only flags identify the type of device and its features. | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||
| DeviceID | STRING | Unique device identifier for the mounted volume, when available. | |||||||||||||||||||||||||||||||||||||||||||
If a volume exposes a unique device identifier such as a factory serial number, it will be readable from this field. The field is empty when the selected volume or file system driver does not provide an identifier. | |||||||||||||||||||||||||||||||||||||||||||||
| DeviceSize | INT64 | Total storage capacity of the resolved volume, measured in bytes. | |||||||||||||||||||||||||||||||||||||||||||
This field indicates the total byte capacity reported by the host file system for the selected volume. It does not reflect the remaining writable space; use BytesFree for that value. A value of | |||||||||||||||||||||||||||||||||||||||||||||
| Volume | STRING | The volume name of the device to query. | |||||||||||||||||||||||||||||||||||||||||||
Set the Volume field prior to initialisation so that the object can query the selected volume. The standard volume string format is | |||||||||||||||||||||||||||||||||||||||||||||
| Name | Description |
|---|---|
| DEVICE::BOOKMARK | This marker indicates that the presented volume is a bookmark and not a device name |
| DEVICE::COMPACT_DISC | Compact disc style device |
| DEVICE::FIXED | Catch-all for fixed media devices that are not directly identifiable |
| DEVICE::FLOPPY_DISK | Floppy disk style device |
| DEVICE::HARD_DISK | Hard disk style device |
| DEVICE::MEMORY | Device is RAM, ROM, WORM, NVRAM, flashdisk or other form of memory. Does not guarantee a fast connection as it could be over a slow USB 1.1 connection for example |
| DEVICE::MODEM | Device is a modem |
| DEVICE::NETWORK | Device represents a network link |
| DEVICE::PRINTER | Device is a paper-based printer |
| DEVICE::PRINTER_3D | Device is a three dimensional printer |
| DEVICE::READ | Device is readable |
| DEVICE::REMOVABLE | Device media is removable from the hardware |
| DEVICE::REMOVEABLE | Device media is removable from the hardware |
| DEVICE::SCANNER | Device is a two dimensional scanner |
| DEVICE::SCANNER_3D | Device is a three dimensional scanner |
| DEVICE::SOFTWARE | Device is virtual/software defined |
| DEVICE::TAPE | Tape/Stream style device |
| DEVICE::TEMPORARY | All storage is temporary |
| DEVICE::USB | Removable USB storage device. May be further qualified by HARD_DISK, FLOPPY_DISK etc |
| DEVICE::WRITE | Device is writeable |