pub struct FilesystemReader<'repo, ObjectID: FsVerityHashValue> {
repo: Option<&'repo Repository<ObjectID>>,
inodes: HashMap<(u64, u64), Rc<Leaf<ObjectID>>>,
}Expand description
Helper for reading filesystem trees from disk into composefs representation.
Tracks hardlinks via inode numbers and handles integration with repositories for storing large file content.
Fields§
§repo: Option<&'repo Repository<ObjectID>>§inodes: HashMap<(u64, u64), Rc<Leaf<ObjectID>>>Implementations§
Source§impl<ObjectID: FsVerityHashValue> FilesystemReader<'_, ObjectID>
impl<ObjectID: FsVerityHashValue> FilesystemReader<'_, ObjectID>
fn read_xattrs(fd: &OwnedFd) -> Result<BTreeMap<Box<OsStr>, Box<[u8]>>>
fn stat(fd: &OwnedFd, ifmt: FileType) -> Result<(Stat, Stat)>
fn read_leaf_content( &mut self, fd: OwnedFd, buf: Stat, ) -> Result<LeafContent<ObjectID>>
fn read_leaf( &mut self, dirfd: &OwnedFd, name: &OsStr, ifmt: FileType, ) -> Result<Rc<Leaf<ObjectID>>>
Sourcefn read_directory(
&mut self,
dirfd: impl AsFd,
name: &OsStr,
) -> Result<Directory<ObjectID>>
fn read_directory( &mut self, dirfd: impl AsFd, name: &OsStr, ) -> Result<Directory<ObjectID>>
Reads a directory from disk into composefs representation.
Recursively reads directory contents, tracking hardlinks and optionally reading the directory’s own metadata. Large files are stored in the repository if one was provided.
fn read_inode( &mut self, dirfd: &OwnedFd, name: &OsStr, ifmt: FileType, ) -> Result<Inode<ObjectID>>
Trait Implementations§
Auto Trait Implementations§
impl<'repo, ObjectID> Freeze for FilesystemReader<'repo, ObjectID>
impl<'repo, ObjectID> !RefUnwindSafe for FilesystemReader<'repo, ObjectID>
impl<'repo, ObjectID> !Send for FilesystemReader<'repo, ObjectID>
impl<'repo, ObjectID> !Sync for FilesystemReader<'repo, ObjectID>
impl<'repo, ObjectID> Unpin for FilesystemReader<'repo, ObjectID>
impl<'repo, ObjectID> !UnwindSafe for FilesystemReader<'repo, ObjectID>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more