Trait rrgen::FsDriver

source ·
pub trait FsDriver {
    // Required methods
    fn write_file(&self, path: &Path, content: &str) -> Result<(), Error>;
    fn read_file(&self, path: &Path) -> Result<String, Error>;
    fn exists(&self, path: &Path) -> bool;
}

Required Methods§

source

fn write_file(&self, path: &Path, content: &str) -> Result<(), Error>

Write a file

Errors

This function will return an error if it fails

source

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

Read a file

Errors

This function will return an error if it fails

source

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

Implementors§