Skip to main content

Module local_fs

Module local_fs 

Source
Expand description

Local filesystem backend for development and testing.

Complete object files are published by atomically renaming same-directory drafts, so readers observe either the previous or next complete file. Unpublished drafts are removed automatically when dropped.

To avoid races on metadata, expiry, and upload updates, this backend uses locks placed under .locks/ to synchronize mutations across backend instances and cooperating processes. The first two bytes of the BLAKE3 hash of an object’s storage path select one of 65,536 permanent lock slots under .locks/<first byte>/<second byte> (lowercase hexadecimal). An object and all of its resumable uploads share the same lock.

Shared filesystems are supported only when locks propagate across the cluster, pathname visibility is coherent, and rename is atomic.

Newly created files and directories are owner-only on Unix (0600 and 0700 respectively, further restricted by umask). Existing paths retain their permissions.

Structs§

FileSystemConfig
Configuration for LocalFsBackend.
LocalFsBackend
Local filesystem backend for development and testing.