pub struct ErofsReader { /* private fields */ }Expand description
A handle to an open EROFS image for reading.
Implementations§
Source§impl ErofsReader
impl ErofsReader
Sourcepub fn read_file(&mut self, path: &str) -> Result<Vec<u8>>
pub fn read_file(&mut self, path: &str) -> Result<Vec<u8>>
Read a file by path from the EROFS image. Returns the file data.
Sourcepub fn read_link(&mut self, path: &str) -> Result<Vec<u8>>
pub fn read_link(&mut self, path: &str) -> Result<Vec<u8>>
Read a symlink target by path from the EROFS image.
pub fn entry_info(&mut self, path: &str) -> Result<ErofsEntryInfo>
Sourcepub fn walk(&mut self) -> Result<Vec<ErofsTreeEntry>>
pub fn walk(&mut self) -> Result<Vec<ErofsTreeEntry>>
Walk all entries in the image in stable path order.
Sourcepub fn walk_entries<E, F>(&mut self, visit: F) -> Result<(), E>
pub fn walk_entries<E, F>(&mut self, visit: F) -> Result<(), E>
Walk all entries in stable path order, invoking a callback for each entry.
Sourcepub fn file_data_reader(&mut self, nid: u32) -> Result<ErofsFileDataReader>
pub fn file_data_reader(&mut self, nid: u32) -> Result<ErofsFileDataReader>
Create a streaming reader for a regular file inode by NID.
Auto Trait Implementations§
impl Freeze for ErofsReader
impl RefUnwindSafe for ErofsReader
impl Send for ErofsReader
impl Sync for ErofsReader
impl Unpin for ErofsReader
impl UnsafeUnpin for ErofsReader
impl UnwindSafe for ErofsReader
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