Charge directory creation against a mount's write_bytes_limit
Ā
RE
1d ago+148+148+012345678901234567890123456789-44-44-01234567890123456789
We can optionally (default off) set write limits on a mount, however we do not currently charge for writing directories.
This prices directories at 4096 bytes charging them towards the same write_bytes_limit.
š¤ Generated with Claude Code
Summary by cubic
Makes mkdir count against a mount's write_bytes_limit so a write budget also bounds how many directories sandboxed code can create.
- Each directory created, parents included, is charged 4,096 bytes (
DIRECTORY_WRITE_BYTES) before anything is created; the charge is committed only after the operation succeeds. - Overlay
mkdir(parents=True)collects the directories it will record first, so a refused call leaves no partial tree. mkdiron an existing directory is free, and the limit remains optional with unlimited as the default.