Skip to main content

FileSystem

Trait FileSystem 

Source
pub trait FileSystem: Send + Sync {
    // Required methods
    fn read_file(&self, path: &Path) -> Result<String>;
    fn list_files(
        &self,
        root: &Path,
        extensions: &[&str],
    ) -> Result<Vec<PathBuf>>;
    fn file_hash(&self, path: &Path) -> Result<String>;
}
Expand description

Filesystem abstraction for reading source files.

Required Methods§

Source

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

Source

fn list_files(&self, root: &Path, extensions: &[&str]) -> Result<Vec<PathBuf>>

Source

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

Implementors§