Expand description
How much room is left on the filesystem a path lives on.
Leviath asks this before letting an agent write, because the failure it
guards against is not a bad write but a full disk: a run that filled C:
took the machine down with it, and every other process on it (issue #252).
There is no free-space API in std, and this workspace forbids unsafe, so
the syscall is delegated to fs4 - the same arrangement nix has here for
process and permission calls.
Functionsยง
- available_
bytes - Bytes still writable on the filesystem containing
path, orNonewhen the question cannot be answered. - total_
bytes - Total size of the filesystem containing
path, orNonewhen the question cannot be answered.