Skip to main content

Module disk_quota

Module disk_quota 

Source
Expand description

The blueprint’s size_limit: a byte budget for the files in one VFS.

Writers reserve before they write and release what they free, so the count tracks the directory without walking it. Files a program holds open are tracked too: an open file’s data stays on disk after its name is removed, so its bytes are freed when the last handle closes rather than when the name goes.

Structs§

DiskQuota
A byte budget for the files in one VFS.
OpenFileGuard
Keeps a file registered as open with a DiskQuota while a handle holds it.
QuotaCharge
One write’s claim on a DiskQuota, from its first byte until it commits or is abandoned.

Enums§

Holder
What holds a file open: a reader, or the writer that created it and settles its bytes itself.
QuotaExceeded
A write refused by the VFS’s size limit: over it, or unable to tell because the directory couldn’t be measured.