Ext4ReaderAction

Trait Ext4ReaderAction 

Source
pub trait Ext4ReaderAction<'ext4, 'reader, T: Seek + Read> {
    // Required methods
    fn root(&mut self) -> Result<FileInfo, Ext4Error>;
    fn read_dir(&mut self, inode: u32) -> Result<FileInfo, Ext4Error>;
    fn superblock(&mut self) -> Result<SuperBlock, Ext4Error>;
    fn descriptors(&mut self) -> Result<Vec<Descriptor>, Ext4Error>;
    fn extents(&mut self, inode: u32) -> Result<Option<Extents>, Ext4Error>;
    fn stat(&mut self, inode: u32) -> Result<Stat, Ext4Error>;
    fn hash(
        &mut self,
        inode: u32,
        hash: &Ext4Hash,
    ) -> Result<HashValue, Ext4Error>;
    fn reader(
        &'reader mut self,
        inode: u32,
    ) -> Result<FileReader<'reader, T>, Ext4Error>;
    fn read(&mut self, inode: u32) -> Result<Vec<u8>, Ext4Error>;
    fn inode_verbose(&mut self, inode: u32) -> Result<Inode, Ext4Error>;
}

Required Methods§

Source

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>

Read a directory based on provided inode value

Source

fn superblock(&mut self) -> Result<SuperBlock, Ext4Error>

Return the SuperBlock information for the ext4 filesystem

Source

fn descriptors(&mut self) -> Result<Vec<Descriptor>, Ext4Error>

Return descriptors for the ext4 filesystem

Source

fn extents(&mut self, inode: u32) -> Result<Option<Extents>, Ext4Error>

Return extents for a provide inode

Source

fn stat(&mut self, inode: u32) -> Result<Stat, Ext4Error>

Stat a file

Source

fn hash(&mut self, inode: u32, hash: &Ext4Hash) -> Result<HashValue, Ext4Error>

Hash a file. MD5, SHA1, SHA256 are supported

Source

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 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 inode_verbose(&mut self, inode: u32) -> Result<Inode, Ext4Error>

Return verbose inode information for the provided inode

Implementors§

Source§

impl<'ext4, 'reader, T: Seek + Read> Ext4ReaderAction<'ext4, 'reader, T> for Ext4Reader<T>