Skip to main content

MountedFileSystem

Trait MountedFileSystem 

Source
pub trait MountedFileSystem: Any {
Show 32 methods // Required methods fn as_any(&self) -> &dyn Any; fn as_any_mut(&mut self) -> &mut dyn Any; fn read_file(&mut self, path: &str) -> VfsResult<Vec<u8>>; fn read_dir(&mut self, path: &str) -> VfsResult<Vec<String>>; fn read_dir_with_types( &mut self, path: &str, ) -> VfsResult<Vec<VirtualDirEntry>>; fn write_file(&mut self, path: &str, content: Vec<u8>) -> VfsResult<()>; fn create_dir(&mut self, path: &str) -> VfsResult<()>; fn mkdir(&mut self, path: &str, recursive: bool) -> VfsResult<()>; fn exists(&self, path: &str) -> bool; fn stat(&mut self, path: &str) -> VfsResult<VirtualStat>; fn remove_file(&mut self, path: &str) -> VfsResult<()>; fn remove_dir(&mut self, path: &str) -> VfsResult<()>; fn rename(&mut self, old_path: &str, new_path: &str) -> VfsResult<()>; fn realpath(&self, path: &str) -> VfsResult<String>; fn symlink(&mut self, target: &str, link_path: &str) -> VfsResult<()>; fn read_link(&self, path: &str) -> VfsResult<String>; fn lstat(&self, path: &str) -> VfsResult<VirtualStat>; fn link(&mut self, old_path: &str, new_path: &str) -> VfsResult<()>; fn chmod(&mut self, path: &str, mode: u32) -> VfsResult<()>; fn chown(&mut self, path: &str, uid: u32, gid: u32) -> VfsResult<()>; fn utimes( &mut self, path: &str, atime_ms: u64, mtime_ms: u64, ) -> VfsResult<()>; fn truncate(&mut self, path: &str, length: u64) -> VfsResult<()>; fn pread( &mut self, path: &str, offset: u64, length: usize, ) -> VfsResult<Vec<u8>>; // Provided methods fn read_dir_limited( &mut self, path: &str, max_entries: usize, ) -> VfsResult<Vec<String>> { ... } fn write_file_with_mode( &mut self, path: &str, content: Vec<u8>, mode: Option<u32>, ) -> VfsResult<()> { ... } fn create_file_exclusive( &mut self, path: &str, content: Vec<u8>, ) -> VfsResult<()> { ... } fn create_file_exclusive_with_mode( &mut self, path: &str, content: Vec<u8>, mode: Option<u32>, ) -> VfsResult<()> { ... } fn append_file(&mut self, path: &str, content: Vec<u8>) -> VfsResult<u64> { ... } fn create_dir_with_mode( &mut self, path: &str, mode: Option<u32>, ) -> VfsResult<()> { ... } fn mkdir_with_mode( &mut self, path: &str, recursive: bool, mode: Option<u32>, ) -> VfsResult<()> { ... } fn utimes_spec( &mut self, path: &str, atime: VirtualUtimeSpec, mtime: VirtualUtimeSpec, follow_symlinks: bool, ) -> VfsResult<()> { ... } fn shutdown(&mut self) -> VfsResult<()> { ... }
}

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Source

fn read_file(&mut self, path: &str) -> VfsResult<Vec<u8>>

Source

fn read_dir(&mut self, path: &str) -> VfsResult<Vec<String>>

Source

fn read_dir_with_types(&mut self, path: &str) -> VfsResult<Vec<VirtualDirEntry>>

Source

fn write_file(&mut self, path: &str, content: Vec<u8>) -> VfsResult<()>

Source

fn create_dir(&mut self, path: &str) -> VfsResult<()>

Source

fn mkdir(&mut self, path: &str, recursive: bool) -> VfsResult<()>

Source

fn exists(&self, path: &str) -> bool

Source

fn stat(&mut self, path: &str) -> VfsResult<VirtualStat>

Source

fn remove_file(&mut self, path: &str) -> VfsResult<()>

Source

fn remove_dir(&mut self, path: &str) -> VfsResult<()>

Source

fn rename(&mut self, old_path: &str, new_path: &str) -> VfsResult<()>

Source

fn realpath(&self, path: &str) -> VfsResult<String>

Source

fn lstat(&self, path: &str) -> VfsResult<VirtualStat>

Source

fn chmod(&mut self, path: &str, mode: u32) -> VfsResult<()>

Source

fn chown(&mut self, path: &str, uid: u32, gid: u32) -> VfsResult<()>

Source

fn utimes(&mut self, path: &str, atime_ms: u64, mtime_ms: u64) -> VfsResult<()>

Source

fn truncate(&mut self, path: &str, length: u64) -> VfsResult<()>

Source

fn pread( &mut self, path: &str, offset: u64, length: usize, ) -> VfsResult<Vec<u8>>

Provided Methods§

Source

fn read_dir_limited( &mut self, path: &str, max_entries: usize, ) -> VfsResult<Vec<String>>

Source

fn write_file_with_mode( &mut self, path: &str, content: Vec<u8>, mode: Option<u32>, ) -> VfsResult<()>

Source

fn create_file_exclusive( &mut self, path: &str, content: Vec<u8>, ) -> VfsResult<()>

Source

fn create_file_exclusive_with_mode( &mut self, path: &str, content: Vec<u8>, mode: Option<u32>, ) -> VfsResult<()>

Source

fn append_file(&mut self, path: &str, content: Vec<u8>) -> VfsResult<u64>

Source

fn create_dir_with_mode( &mut self, path: &str, mode: Option<u32>, ) -> VfsResult<()>

Source

fn mkdir_with_mode( &mut self, path: &str, recursive: bool, mode: Option<u32>, ) -> VfsResult<()>

Source

fn utimes_spec( &mut self, path: &str, atime: VirtualUtimeSpec, mtime: VirtualUtimeSpec, follow_symlinks: bool, ) -> VfsResult<()>

Source

fn shutdown(&mut self) -> VfsResult<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> MountedFileSystem for Box<T>
where T: MountedFileSystem + ?Sized + 'static,

Source§

fn as_any(&self) -> &dyn Any

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Source§

fn read_file(&mut self, path: &str) -> VfsResult<Vec<u8>>

Source§

fn read_dir(&mut self, path: &str) -> VfsResult<Vec<String>>

Source§

fn read_dir_limited( &mut self, path: &str, max_entries: usize, ) -> VfsResult<Vec<String>>

Source§

fn read_dir_with_types(&mut self, path: &str) -> VfsResult<Vec<VirtualDirEntry>>

Source§

fn write_file(&mut self, path: &str, content: Vec<u8>) -> VfsResult<()>

Source§

fn create_dir(&mut self, path: &str) -> VfsResult<()>

Source§

fn mkdir(&mut self, path: &str, recursive: bool) -> VfsResult<()>

Source§

fn exists(&self, path: &str) -> bool

Source§

fn stat(&mut self, path: &str) -> VfsResult<VirtualStat>

Source§

fn remove_file(&mut self, path: &str) -> VfsResult<()>

Source§

fn remove_dir(&mut self, path: &str) -> VfsResult<()>

Source§

fn rename(&mut self, old_path: &str, new_path: &str) -> VfsResult<()>

Source§

fn realpath(&self, path: &str) -> VfsResult<String>

Source§

fn lstat(&self, path: &str) -> VfsResult<VirtualStat>

Source§

fn chmod(&mut self, path: &str, mode: u32) -> VfsResult<()>

Source§

fn chown(&mut self, path: &str, uid: u32, gid: u32) -> VfsResult<()>

Source§

fn utimes(&mut self, path: &str, atime_ms: u64, mtime_ms: u64) -> VfsResult<()>

Source§

fn utimes_spec( &mut self, path: &str, atime: VirtualUtimeSpec, mtime: VirtualUtimeSpec, follow_symlinks: bool, ) -> VfsResult<()>

Source§

fn truncate(&mut self, path: &str, length: u64) -> VfsResult<()>

Source§

fn pread( &mut self, path: &str, offset: u64, length: usize, ) -> VfsResult<Vec<u8>>

Source§

fn shutdown(&mut self) -> VfsResult<()>

Implementors§