FileSystem.freeSpace

Request how much free space in bytes is available on the disk/mountpoint where folder resides

If a quota limit exists for this area, that will be taken into account unless superuser is set to true.

If a user has exceeded the quota, a negative number can be returned.

Note that the difference between total available space and free space will not equal the combined size of the contents on the file system, since the numbers for the functions here are calculated from the used blocks, including those spent on metadata and file nodes.

If actual used space is wanted one should use the statistics functionality of ocean.io.vfs.

struct FileSystem
static
long
freeSpace
(
char[] folder
,
bool superuser = false
)

See Also

totalSpace()

Meta