Skip to main content

Filesystem

Trait Filesystem 

Source
pub trait Filesystem: Send + Sync {
    // Required methods
    fn copy(&self, src: &PathBuf, dest: &PathBuf) -> Result<(), OxiNavError>;
    fn rename(&self, src: &PathBuf, dest: &PathBuf) -> Result<(), OxiNavError>;
    fn delete(&self, path: &PathBuf) -> Result<(), OxiNavError>;
    fn create_dir(&self, path: &PathBuf) -> Result<(), OxiNavError>;
    fn exists(&self, path: &PathBuf) -> bool;
}

Required Methods§

Source

fn copy(&self, src: &PathBuf, dest: &PathBuf) -> Result<(), OxiNavError>

Source

fn rename(&self, src: &PathBuf, dest: &PathBuf) -> Result<(), OxiNavError>

Source

fn delete(&self, path: &PathBuf) -> Result<(), OxiNavError>

Source

fn create_dir(&self, path: &PathBuf) -> Result<(), OxiNavError>

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§