Skip to content

Modern Fs GetDiskSpace

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

Home › Filesystem › Filesystem Library › GetDiskSpace

GetDiskSpace

Returns the total, free and available bytes of the volume a path is on.

Syntax

GetDiskSpace( p )

Notes

  • FsResultSpace

Examples

#import "std/fs"
using fs

dim r as FsResultSpace = GetDiskSpace( "." )

print r.IsOk( )              '' true

dim sp as DiskSpace = r.Value( )
print sp.TotalBytes > 0      '' -1 (true)
print sp.AvailableBytes <= sp.FreeBytes    '' -1 (true)

'' Three numbers, and the difference between the last two is quotas

Library: Filesystem Library
Category: Filesystem
Documented under: Volumes

Clone this wiki locally