Skip to main content

MountedFileSystem

Trait MountedFileSystem 

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

Required Methods§

Source

fn as_any(&self) -> &(dyn Any + 'static)

Source

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Provided Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn shutdown(&mut self) -> Result<(), VfsError>

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 + 'static + ?Sized,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn shutdown(&mut self) -> Result<(), VfsError>

Implementors§