pub struct ArchiveTree { /* private fields */ }Expand description
A directory tree built from archive entry paths.
Implementations§
Source§impl ArchiveTree
impl ArchiveTree
Sourcepub fn insert(
&mut self,
path: &str,
is_dir: bool,
size: u64,
mtime: FsTimestamp,
payload_id: Option<usize>,
) -> Option<u64>
pub fn insert( &mut self, path: &str, is_dir: bool, size: u64, mtime: FsTimestamp, payload_id: Option<usize>, ) -> Option<u64>
Insert a file (or explicit directory) at path, creating any missing
intermediate directories. Returns the leaf inode, or None if the path
is unsafe (absolute, empty, or contains a .. component) and was
skipped.
Sourcepub fn payload_id(&self, ino: u64) -> Option<usize>
pub fn payload_id(&self, ino: u64) -> Option<usize>
The backend payload handle for a leaf file, if any.
Sourcepub fn lookup(&self, parent_ino: u64, name: &[u8]) -> FsResult<Option<u64>>
pub fn lookup(&self, parent_ino: u64, name: &[u8]) -> FsResult<Option<u64>>
Look up a child by name within a directory.
Sourcepub fn metadata(&self, ino: u64) -> FsResult<FsMetadata>
pub fn metadata(&self, ino: u64) -> FsResult<FsMetadata>
Metadata for an inode.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArchiveTree
impl RefUnwindSafe for ArchiveTree
impl Send for ArchiveTree
impl Sync for ArchiveTree
impl Unpin for ArchiveTree
impl UnsafeUnpin for ArchiveTree
impl UnwindSafe for ArchiveTree
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more