sb.
Write files
Upload bytes or strings into the Sailbox filesystem. Paths must be absolute. Missing parent directories are created by default.write writes one file and can stream a file-like source in Python;
write_files holds every file’s contents in memory.
0o644.
Read files
Fetch a regular file back as bytes:Work with directories
Thefs namespace also covers directory work. mkdir creates a directory and
any missing parents, ls lists a directory’s immediate entries as structured
records (name, type, size, modified time, mode), exists checks a path, and
remove deletes a file or directory tree:
Uploading and downloading directories
Every SDK provides directory transfer methods that move whole trees in one call. They ship one compressed archive instead of one call per file, so a tree of many small files transfers quickly:/proc or /sys hold files that cannot be read
as plain data, and downloading them fails. A file that is being written
while the download runs is captured as it is at that moment, the way
copying a live file would; download after writers finish for a consistent
copy. On Windows, a directory that contains symbolic links cannot be
downloaded, since Windows restricts creating them. The Sailbox image must
provide tar and gzip, which the default images do.