Expand description
Reading and writing filesystem trees to/from disk.
This module provides functionality to read filesystem structures from disk into composefs tree representations and write them back, including handling of hardlinks, extended attributes, and repository integration.
Structsยง
- Filesystem
Reader - Helper for reading filesystem trees from disk into composefs representation.
Constantsยง
- CONTAINER_
XATTR_ ALLOWLIST - Default xattr allowlist for container filesystems.
Functionsยง
- is_
allowed_ container_ xattr - Returns true if the given xattr name is in
CONTAINER_XATTR_ALLOWLIST. - read_
container_ root - Load a container root filesystem from the given path.
- read_
file - Read the contents of a file.
- read_
filesystem - Load a filesystem tree from the given path. A repository may be provided; if it is, then all files found in the filesystem are copied in.
- read_
filesystem_ filtered - Load a filesystem tree from the given path, filtering xattrs with a predicate.
- set_
file_ ๐contents - Attempt to use O_TMPFILE + rename to atomically set file contents. Will fall back to a non-atomic write if the target doesnโt support O_TMPFILE.
- write_
directory ๐ - write_
directory_ ๐contents - write_
leaf ๐ - write_
to_ path - Writes a directory tree from composefs representation to a filesystem path.