pub struct FileNode(/* private fields */);Expand description
A file node in the EROFS image.
Methods from Deref<Target = NodeInner>§
Sourcepub fn data_layout(&self) -> InodeDataLayout
pub fn data_layout(&self) -> InodeDataLayout
Returns the data layout of this node.
Sourcepub fn blkaddr_offset(
&self,
block_size: u64,
offset: u64,
) -> Result<u64, ParsingError>
pub fn blkaddr_offset( &self, block_size: u64, offset: u64, ) -> Result<u64, ParsingError>
Safely calculate the on-disk offset for a read in this nodes data. This doesn’t check out of bounds errors.
Sourcepub fn metadata_end_offset(&self) -> Result<u64, ParsingError>
pub fn metadata_end_offset(&self) -> Result<u64, ParsingError>
Offset immediately following this node’s metadata and inline xattrs.
Sourcepub fn compression_header(&self) -> Option<&CompressionHeader>
pub fn compression_header(&self) -> Option<&CompressionHeader>
Returns the compression header for this node, if it has a compressed data layout.
Sourcepub fn compact_entry_pos(
&self,
block_size: u64,
cluster_index: u64,
) -> Result<CompactEntry, ParsingError>
pub fn compact_entry_pos( &self, block_size: u64, cluster_index: u64, ) -> Result<CompactEntry, ParsingError>
Returns the position and layout of a compact logical cluster index entry.
Sourcepub fn index_end_offset(&self, block_size: u64) -> Result<u64, ParsingError>
pub fn index_end_offset(&self, block_size: u64) -> Result<u64, ParsingError>
Offset immediately following the logical cluster index table. For files with inline data, this is where the inline data is stored.
Sourcepub fn total_lclusters(&self, lcluster_size: u64) -> u64
pub fn total_lclusters(&self, lcluster_size: u64) -> u64
Returns the total number of logical clusters for this node.
pub fn size(&self) -> u64
pub fn ino(&self) -> u32
pub fn nid(&self) -> u64
pub fn link_count(&self) -> u32
pub fn uid(&self) -> u32
pub fn gid(&self) -> u32
pub fn mtime_ns(&self) -> u64
pub fn mode(&self) -> u16
Sourcepub fn storage_size(&self, block_size: u64) -> u64
pub fn storage_size(&self, block_size: u64) -> u64
Returns the storage size in bytes taken up by this node on disk.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileNode
impl RefUnwindSafe for FileNode
impl Send for FileNode
impl Sync for FileNode
impl Unpin for FileNode
impl UnsafeUnpin for FileNode
impl UnwindSafe for FileNode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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