std.fs.statvfs

std.fs

statvfs(path) -> info, err

Get filesystem capacity information for a path

Wraps statvfs(3). Returns a table with bsize, blocks, bfree, bavail, files and ffree. Block counts are in units of bsize, which carries the fragment size (f_frsize) the counts are defined in, so blocks * bsize is byte-correct. bavail is the space available to unprivileged users; bfree includes the root reserve.