Skip to content

Modern Fs DiskSpace AvailableBytes

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

Home › Filesystem › Filesystem Library › DiskSpace.AvailableBytes

DiskSpace.AvailableBytes

Returns the bytes this user may still write; the number to check before writing.

Syntax

DiskSpace.AvailableBytes

Examples

#import "std/fs"
using fs

dim sp as DiskSpace = GetDiskSpace( "." ).Value( )

'' FREE TO THIS USER -- the one to branch on before writing, because a
'' quota can make it far smaller than FreeBytes
print sp.AvailableBytes <= sp.FreeBytes    '' -1 (true)

dim as uint64 need = 1024
if sp.AvailableBytes > need then print "room to write"

Library: Filesystem Library
Category: Filesystem
Documented under: Volumes

Clone this wiki locally