Skip to main content

VirtualFileSystem

Trait VirtualFileSystem 

Source
pub trait VirtualFileSystem {
    // Required methods
    fn read(&self, path: &Path) -> Result<Vec<u8>>;
    fn write_atomic(&self, path: &Path, bytes: &[u8]) -> Result<()>;
    fn hash(&self, path: &Path) -> Result<String>;
    fn cwd(&self) -> Result<PathBuf>;
    fn list_tree(&self, path: &Path) -> Result<Vec<TreeNode>>;
    fn recent_file_hashes(&self, limit: usize) -> Result<Vec<FileHash>>;
}

Required Methods§

Source

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

Source

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

Source

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

Source

fn cwd(&self) -> Result<PathBuf>

Source

fn list_tree(&self, path: &Path) -> Result<Vec<TreeNode>>

Source

fn recent_file_hashes(&self, limit: usize) -> Result<Vec<FileHash>>

Implementors§