Skip to content

Modern Fs GetVolumes

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Filesystem › Filesystem Library › GetVolumes

GetVolumes

Fills an Array with a VolumeInfo for each drive or mounted disk; returns the count.

Syntax

GetVolumes( vols )

Notes

  • FsResultLong; fills Array( of VolumeInfo )

Examples

#import "std/containers"
#import "std/fs"
using fs, containers

'' Every mounted volume, filling an Array
dim vols as Array( of VolumeInfo )
dim r as FsResultLong = GetVolumes( vols )

print r.IsOk( )              '' true
print r.Value( ) >= 1        '' -1 (true) -- at least one
print vols.Count = r.Value( )              '' -1 (true)

for i as int32 = 0 to vols.Count - 1
    print len( vols[ i ].RootPath ) > 0    '' -1 (true) for each
next

Library: Filesystem Library
Category: Filesystem
Documented under: Volumes

Clone this wiki locally