Skip to main content

FileSystem

Trait FileSystem 

Source
pub trait FileSystem {
    // Required methods
    fn read_string(path: &Path) -> Result<String>;
    fn write_string(path: &Path, content: &str) -> Result<()>;
    fn current_dir() -> Result<PathBuf>;
    fn is_a_dir(path: &Path) -> bool;
    fn is_a_file(path: &Path) -> bool;
}

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§