Struct ext4::SuperBlock [−][src]
pub struct SuperBlock<R> { /* fields omitted */ }
The critical core of the filesystem.
Methods
impl<R> SuperBlock<R> where
R: Read + Seek,
[src]
impl<R> SuperBlock<R> where
R: Read + Seek,
pub fn new(inner: R) -> Result<SuperBlock<R>, Error>
[src]
pub fn new(inner: R) -> Result<SuperBlock<R>, Error>
Open a filesystem, and load its superblock.
pub fn new_with_options(
inner: R,
options: &Options
) -> Result<SuperBlock<R>, Error>
[src]
pub fn new_with_options(
inner: R,
options: &Options
) -> Result<SuperBlock<R>, Error>
pub fn load_inode(&mut self, inode: u32) -> Result<Inode, Error>
[src]
pub fn load_inode(&mut self, inode: u32) -> Result<Inode, Error>
Load a filesystem entry by inode number.
pub fn root(&mut self) -> Result<Inode, Error>
[src]
pub fn root(&mut self) -> Result<Inode, Error>
Load the root node of the filesystem (typically /
).
pub fn walk<F>(
&mut self,
inode: &Inode,
path: &str,
visit: &mut F
) -> Result<bool, Error> where
F: FnMut(&mut Self, &str, &Inode, &Enhanced) -> Result<bool, Error>,
[src]
pub fn walk<F>(
&mut self,
inode: &Inode,
path: &str,
visit: &mut F
) -> Result<bool, Error> where
F: FnMut(&mut Self, &str, &Inode, &Enhanced) -> Result<bool, Error>,
Visit every entry in the filesystem in an arbitrary order.
The closure should return true
if it wants walking to continue.
The method returns true
if the closure always returned true.
pub fn resolve_path(&mut self, path: &str) -> Result<DirEntry, Error>
[src]
pub fn resolve_path(&mut self, path: &str) -> Result<DirEntry, Error>
Parse a path, and find the directory entry it represents. Note that "/foo/../bar" will be treated literally, not resolved to "/bar" then looked up.
pub fn open(&mut self, inode: &Inode) -> Result<TreeReader<&mut R>, Error>
[src]
pub fn open(&mut self, inode: &Inode) -> Result<TreeReader<&mut R>, Error>
Read the data from an inode. You might not want to call this on thigns that aren't regular files.
pub fn enhance(&mut self, inode: &Inode) -> Result<Enhanced, Error>
[src]
pub fn enhance(&mut self, inode: &Inode) -> Result<Enhanced, Error>
Load extra metadata about some types of entries.
Trait Implementations
impl<R: Debug> Debug for SuperBlock<R>
[src]
impl<R: Debug> Debug for SuperBlock<R>
Auto Trait Implementations
impl<R> Send for SuperBlock<R> where
R: Send,
impl<R> Send for SuperBlock<R> where
R: Send,
impl<R> Sync for SuperBlock<R> where
R: Sync,
impl<R> Sync for SuperBlock<R> where
R: Sync,