pub struct MountableFs { /* private fields */ }Expand description
A filesystem router that composes multiple backends at different mount points.
Operations are dispatched to the filesystem with the longest matching mount point prefix. If no mount matches, the base filesystem handles the request.
Implementations§
Trait Implementations§
Source§impl Debug for MountableFs
impl Debug for MountableFs
Source§impl VirtualFs for MountableFs
impl VirtualFs for MountableFs
fn read_file(&self, file_path: &str) -> Result<Vec<u8>, FsError>
fn read_file_string(&self, file_path: &str) -> Result<String, FsError>
fn write_file(&self, file_path: &str, content: &[u8]) -> Result<(), FsError>
fn append_file(&self, file_path: &str, content: &[u8]) -> Result<(), FsError>
fn exists(&self, file_path: &str) -> bool
fn stat(&self, file_path: &str) -> Result<Metadata, FsError>
fn lstat(&self, file_path: &str) -> Result<Metadata, FsError>
fn mkdir(&self, dir_path: &str, recursive: bool) -> Result<(), FsError>
fn readdir(&self, dir_path: &str) -> Result<Vec<DirEntry>, FsError>
fn rm( &self, file_path: &str, recursive: bool, force: bool, ) -> Result<(), FsError>
fn cp(&self, src: &str, dest: &str, recursive: bool) -> Result<(), FsError>
fn mv(&self, src: &str, dest: &str) -> Result<(), FsError>
fn chmod(&self, file_path: &str, mode: u32) -> Result<(), FsError>
fn symlink(&self, target: &str, link_path: &str) -> Result<(), FsError>
fn hard_link(&self, existing: &str, new_path: &str) -> Result<(), FsError>
fn readlink(&self, link_path: &str) -> Result<String, FsError>
fn realpath(&self, file_path: &str) -> Result<String, FsError>
fn touch(&self, file_path: &str) -> Result<(), FsError>
fn set_times( &self, file_path: &str, mtime: Option<SystemTime>, ) -> Result<(), FsError>
Auto Trait Implementations§
impl Freeze for MountableFs
impl !RefUnwindSafe for MountableFs
impl !Send for MountableFs
impl !Sync for MountableFs
impl Unpin for MountableFs
impl UnsafeUnpin for MountableFs
impl !UnwindSafe for MountableFs
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