Write files
Usewrite() to upload bytes, strings, or file-like objects into the Sailbox
filesystem. Paths must be absolute. Missing parent directories are created by
default.
mode to set POSIX permission bits. When omitted, writes default to
0o644.
create_parents=False if you want writes to fail when parent directories
are missing:
Read files
Useread() to fetch a regular file back as bytes:
read() buffers the full file in memory. For larger files, use read_stream()
to iterate over chunks:
Work with directories
The filesystem API reads and writes regular files. Useexec() for directory
operations, archives, and shell-native workflows:
Persist state with checkpoints
Runtime writes live on the Sailbox state disk. Callcheckpoint() after
important writes if you want recovery and future resumes to start from that
point: