Kōtuku
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Config
    • Core
    • Display
    • Document
    • Font
    • HTTP
    • Network
    • Regex
    • SVG
    • Tiri
    • Vector
    • XML
    • XQuery
    • XRandR
      • Audio
      • MP3
      • Sound
      • File
      • MetaClass
      • Module
      • StorageDevice
      • Task
      • Thread
      • Time
      • Compression
      • CompressedStream
      • Config
      • LZMAStream
      • Script
      • Tiri
      • XML
      • XQuery
      • Controller
      • BlurFX
      • ColourFX
      • CompositeFX
      • ConvolveFX
      • DisplacementFX
      • FilterEffect
      • FloodFX
      • ImageFX
      • LightingFX
      • MergeFX
      • MorphologyFX
      • OffsetFX
      • RemapFX
      • SourceFX
      • TurbulenceFX
      • WaveFunctionFX
      • Scintilla
      • Bitmap
      • Clipboard
      • Display
      • Document
      • Font
      • Image
      • Pointer
      • Surface
      • SVG
      • ClientSocket
      • HTTP
      • NetClient
      • NetLookup
      • NetServer
      • NetSocket
      • Proxy
      • Gradient
      • GradientConic
      • GradientContour
      • GradientDiamond
      • GradientDiffusion
      • GradientDistal
      • GradientGouraud
      • GradientLinear
      • GradientMesh
      • GradientRadial
      • GradientVoronoi
      • Vector
      • VectorClip
      • VectorColour
      • VectorEllipse
      • VectorFilter
      • VectorGradient
      • VectorGroup
      • VectorImage
      • VectorPath
      • VectorPattern
      • VectorPolygon
      • VectorRectangle
      • VectorScene
      • VectorShape
      • VectorSpiral
      • VectorText
      • VectorTransition
      • VectorViewport
      • VectorWave
      • Linux Builds
      • Windows Builds
      • Customising Your Build
      • Kōtuku Objects
      • Kōtuku In Depth
      • Kōtuku Design Patterns
      • Coding With AI
      • Regex Manual
      • XML Comparisons
      • Tiri Reference Manual
      • Config API
      • Defer Syntax
      • GUI API
      • HTTP Server API
      • I/O API
      • JSON API
      • OAuth API
      • Options API
      • Proxy Server API
      • Tempus API
      • URL API
      • VFX API
      • Widgets
      • RIPL Reference Manual
      • Origo
      • Flute / Unit Testing
      • Tuku
      • Embedded Document Format
      • TDL Reference Manual
      • TDL Tools
      • Action Reference Manual
      • System Error Codes

StorageDevice Class

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.

Structure

The StorageDevice class consists of the following fields:

Access
NameTypeComment
 BytesFreeINT64Amount 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 -1 indicates that the amount could not be determined for the selected volume.

 BytesUsedINT64Amount 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 0 can indicate that usage could not be determined for the selected volume.

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.

 DeviceFlagsDEVICEThese read-only flags identify the type of device and its features.
NameDescription
DEVICE::BOOKMARKThis marker indicates that the presented volume is a bookmark and not a device name
DEVICE::COMPACT_DISCCompact disc style device
DEVICE::FIXEDCatch-all for fixed media devices that are not directly identifiable
DEVICE::FLOPPY_DISKFloppy disk style device
DEVICE::HARD_DISKHard disk style device
DEVICE::MEMORYDevice 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::MODEMDevice is a modem
DEVICE::NETWORKDevice represents a network link
DEVICE::PRINTERDevice is a paper-based printer
DEVICE::PRINTER_3DDevice is a three dimensional printer
DEVICE::READDevice is readable
DEVICE::REMOVABLEDevice media is removable from the hardware
DEVICE::REMOVEABLEDevice media is removable from the hardware
DEVICE::SCANNERDevice is a two dimensional scanner
DEVICE::SCANNER_3DDevice is a three dimensional scanner
DEVICE::SOFTWAREDevice is virtual/software defined
DEVICE::TAPETape/Stream style device
DEVICE::TEMPORARYAll storage is temporary
DEVICE::USBRemovable USB storage device. May be further qualified by HARD_DISK, FLOPPY_DISK etc
DEVICE::WRITEDevice is writeable
 DeviceIDSTRINGUnique 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.

 DeviceSizeINT64Total 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 -1 indicates that capacity could not be determined.

 VolumeSTRINGThe 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:, but omitting the colon or defining complete file system paths when writing this field is also acceptable. Any characters following a colon are stripped automatically, and the stored value is normalised to include the trailing colon.

StorageDevice class documentation © Paul Manias © 1996-2026

DEVICE Type

NameDescription
DEVICE::BOOKMARKThis marker indicates that the presented volume is a bookmark and not a device name
DEVICE::COMPACT_DISCCompact disc style device
DEVICE::FIXEDCatch-all for fixed media devices that are not directly identifiable
DEVICE::FLOPPY_DISKFloppy disk style device
DEVICE::HARD_DISKHard disk style device
DEVICE::MEMORYDevice 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::MODEMDevice is a modem
DEVICE::NETWORKDevice represents a network link
DEVICE::PRINTERDevice is a paper-based printer
DEVICE::PRINTER_3DDevice is a three dimensional printer
DEVICE::READDevice is readable
DEVICE::REMOVABLEDevice media is removable from the hardware
DEVICE::REMOVEABLEDevice media is removable from the hardware
DEVICE::SCANNERDevice is a two dimensional scanner
DEVICE::SCANNER_3DDevice is a three dimensional scanner
DEVICE::SOFTWAREDevice is virtual/software defined
DEVICE::TAPETape/Stream style device
DEVICE::TEMPORARYAll storage is temporary
DEVICE::USBRemovable USB storage device. May be further qualified by HARD_DISK, FLOPPY_DISK etc
DEVICE::WRITEDevice is writeable
StorageDevice module documentation © Paul Manias © 1996-2026