Skip to main content

FileSystem

Trait FileSystem 

Source
pub trait FileSystem:
    Send
    + Sync
    + OxcResolverFileSystem {
    // Required methods
    fn remove_dir_all(&self, path: &Path) -> Result<()>;
    fn create_dir_all(&self, path: &Path) -> Result<()>;
    fn write(&self, path: &Path, content: &[u8]) -> Result<()>;
    fn exists(&self, path: &Path) -> bool;
    fn read(&self, path: &Path) -> Result<Vec<u8>>;
}

Required Methods§

Source

fn remove_dir_all(&self, path: &Path) -> Result<()>

Source

fn create_dir_all(&self, path: &Path) -> Result<()>

Source

fn write(&self, path: &Path, content: &[u8]) -> Result<()>

§Errors
Source

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

Source

fn read(&self, path: &Path) -> Result<Vec<u8>>

§Errors

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§