pub struct Ext4Reader<T: Seek + Read> {
pub fs: BufReader<T>,
pub blocksize: u16,
pub offset_start: u64,
/* private fields */
}Expand description
Create a reader that can parse the ext4 filesystem
Fields§
§fs: BufReader<T>§blocksize: u16Default is probably 4096
offset_start: u64Will be 0. Unless you are reading a disk image file like QCOW or VMDK
Implementations§
Trait Implementations§
Source§impl<'ext4, 'reader, T: Seek + Read> Ext4ReaderAction<'ext4, 'reader, T> for Ext4Reader<T>
impl<'ext4, 'reader, T: Seek + Read> Ext4ReaderAction<'ext4, 'reader, T> for Ext4Reader<T>
Source§fn root(&mut self) -> Result<FileInfo, Ext4Error>
fn root(&mut self) -> Result<FileInfo, Ext4Error>
Return file info about the root directory. Can be used to start a file listing
Source§fn read_dir(&mut self, inode: u32) -> Result<FileInfo, Ext4Error>
fn read_dir(&mut self, inode: u32) -> Result<FileInfo, Ext4Error>
Read a directory based on provided inode value
Source§fn superblock(&mut self) -> Result<SuperBlock, Ext4Error>
fn superblock(&mut self) -> Result<SuperBlock, Ext4Error>
Return the
SuperBlock information for the ext4 filesystemSource§fn hash(
&mut self,
inode: u32,
hashes: &Ext4Hash,
) -> Result<HashValue, Ext4Error>
fn hash( &mut self, inode: u32, hashes: &Ext4Hash, ) -> Result<HashValue, Ext4Error>
Hash a file. MD5, SHA1, SHA256 are supported
Source§fn read(&mut self, inode: u32) -> Result<Vec<u8>, Ext4Error>
fn read(&mut self, inode: u32) -> Result<Vec<u8>, Ext4Error>
Read the contents of a file into memory. WARNING this will read the entire file regardless of size into memory!
Source§fn reader(
&'reader mut self,
inode: u32,
) -> Result<FileReader<'reader, T>, Ext4Error>
fn reader( &'reader mut self, inode: u32, ) -> Result<FileReader<'reader, T>, Ext4Error>
Create a reader to stream a file from the ext4 filesystem.
Source§fn descriptors(&mut self) -> Result<Vec<Descriptor>, Ext4Error>
fn descriptors(&mut self) -> Result<Vec<Descriptor>, Ext4Error>
Return descriptors for the ext4 filesystem
Auto Trait Implementations§
impl<T> Freeze for Ext4Reader<T>where
T: Freeze,
impl<T> RefUnwindSafe for Ext4Reader<T>where
T: RefUnwindSafe,
impl<T> Send for Ext4Reader<T>where
T: Send,
impl<T> Sync for Ext4Reader<T>where
T: Sync,
impl<T> Unpin for Ext4Reader<T>where
T: Unpin,
impl<T> UnsafeUnpin for Ext4Reader<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Ext4Reader<T>where
T: UnwindSafe,
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