Module fs

Module fs 

Source
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Β§

FilesystemReader
Helper for reading filesystem trees from disk into composefs representation.

FunctionsΒ§

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.
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.