pub type FileSystem<T> = FileSystem<RegularFile<T>>;Expand description
A complete filesystem tree, specialized for composefs regular files.
Aliased Type§
pub struct FileSystem<T> {
pub root: Directory<RegularFile<T>>,
}Fields§
§root: Directory<RegularFile<T>>The root directory of the filesystem.
Implementations§
Source§impl<ObjectID: FsVerityHashValue> FileSystem<ObjectID>
impl<ObjectID: FsVerityHashValue> FileSystem<ObjectID>
Sourcepub fn commit_image(
&self,
repository: &Repository<ObjectID>,
image_name: Option<&str>,
) -> Result<ObjectID>
pub fn commit_image( &self, repository: &Repository<ObjectID>, image_name: Option<&str>, ) -> Result<ObjectID>
Commits this filesystem as an EROFS image to the repository.
Generates an EROFS filesystem image and writes it to the repository with the optional name. Returns the fsverity digest of the committed image.
Note: Callers should ensure root metadata is set before calling this,
typically via copy_root_metadata_from_usr() or set_root_stat().
Sourcepub fn compute_image_id(&self) -> ObjectID
pub fn compute_image_id(&self) -> ObjectID
Computes the fsverity digest for this filesystem as an EROFS image.
Generates the EROFS image and returns its fsverity digest without writing to a repository.
Note: Callers should ensure root metadata is set before calling this,
typically via copy_root_metadata_from_usr() or set_root_stat().
Sourcepub fn print_dumpfile(&self) -> Result<()>
pub fn print_dumpfile(&self) -> Result<()>
Prints this filesystem in dumpfile format to stdout.
Serializes the entire filesystem tree to stdout in composefs dumpfile text format.
Note: Callers should ensure root metadata is set before calling this,
typically via copy_root_metadata_from_usr() or set_root_stat().