Skip to main content

FileStore

Trait FileStore 

Source
pub trait FileStore: Send + Sync {
    // Required methods
    fn read(&self, path: &Path) -> Result<String, XcStringsError>;
    fn read_bytes(&self, path: &Path) -> Result<Vec<u8>, XcStringsError>;
    fn write(&self, path: &Path, content: &str) -> Result<(), XcStringsError>;
    fn modified_time(&self, path: &Path) -> Result<SystemTime, XcStringsError>;
    fn exists(&self, path: &Path) -> bool;
    fn create_parent_dirs(&self, path: &Path) -> Result<(), XcStringsError>;
}

Required Methods§

Source

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

Source

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

Source

fn write(&self, path: &Path, content: &str) -> Result<(), XcStringsError>

Source

fn modified_time(&self, path: &Path) -> Result<SystemTime, XcStringsError>

Source

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

Source

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

Implementors§