Struct forensic_rs::core::fs::chroot::ChRootFileSystem
source · pub struct ChRootFileSystem { /* private fields */ }Implementations§
Trait Implementations§
source§impl VirtualFileSystem for ChRootFileSystem
impl VirtualFileSystem for ChRootFileSystem
source§fn read_to_string(&mut self, path: &Path) -> ForensicResult<String>
fn read_to_string(&mut self, path: &Path) -> ForensicResult<String>
Read the entire contents of a file into a string.
source§fn is_live(&self) -> bool
fn is_live(&self) -> bool
Check if the VirtualFileSystem is an abstraction over the real filesystem and not a virtual (like a ZIP file).
source§fn read_all(&mut self, path: &Path) -> ForensicResult<Vec<u8>>
fn read_all(&mut self, path: &Path) -> ForensicResult<Vec<u8>>
Read the entire contents of a file into a bytes vector.
source§fn read(
&mut self,
path: &Path,
pos: u64,
buf: &mut [u8]
) -> ForensicResult<usize>
fn read( &mut self, path: &Path, pos: u64, buf: &mut [u8] ) -> ForensicResult<usize>
Read part of the content of a file into a bytes vector.
source§fn metadata(&mut self, path: &Path) -> ForensicResult<VMetadata>
fn metadata(&mut self, path: &Path) -> ForensicResult<VMetadata>
Get the metadata of a file/dir
source§fn read_dir(&mut self, path: &Path) -> ForensicResult<Vec<VDirEntry>>
fn read_dir(&mut self, path: &Path) -> ForensicResult<Vec<VDirEntry>>
Lists the contents of a Directory
source§fn from_file(
&self,
_file: Box<dyn VirtualFile>
) -> ForensicResult<Box<dyn VirtualFileSystem>>
fn from_file( &self, _file: Box<dyn VirtualFile> ) -> ForensicResult<Box<dyn VirtualFileSystem>>
Initializes a virtual filesystem from a file. Ex: a Zip FS from a file
source§fn from_fs(
&self,
fs: Box<dyn VirtualFileSystem>
) -> ForensicResult<Box<dyn VirtualFileSystem>>
fn from_fs( &self, fs: Box<dyn VirtualFileSystem> ) -> ForensicResult<Box<dyn VirtualFileSystem>>
Initializes a virtual filesystem from a filesyste. Ex: a remapping of windows routes to Linux routes.
source§fn open(&mut self, path: &Path) -> ForensicResult<Box<dyn VirtualFile>>
fn open(&mut self, path: &Path) -> ForensicResult<Box<dyn VirtualFile>>
Open a file
source§fn duplicate(&self) -> Box<dyn VirtualFileSystem>
fn duplicate(&self) -> Box<dyn VirtualFileSystem>
Allows duplicating the existing file system
Auto Trait Implementations§
impl !RefUnwindSafe for ChRootFileSystem
impl !Send for ChRootFileSystem
impl !Sync for ChRootFileSystem
impl Unpin for ChRootFileSystem
impl !UnwindSafe for ChRootFileSystem
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