Trait libimagstore::file_abstraction::FileAbstraction
[−]
[src]
pub trait FileAbstraction: Debug { fn remove_file(&self, path: &PathBuf) -> Result<(), SE>; fn copy(&self, from: &PathBuf, to: &PathBuf) -> Result<(), SE>; fn rename(&self, from: &PathBuf, to: &PathBuf) -> Result<(), SE>; fn create_dir_all(&self, _: &PathBuf) -> Result<(), SE>; fn exists(&self, _: &PathBuf) -> Result<bool, SE>; fn is_file(&self, _: &PathBuf) -> Result<bool, SE>; fn new_instance(&self, p: PathBuf) -> Box<FileAbstractionInstance>; fn drain(&self) -> Result<Drain, SE>; fn fill<'a>(&'a mut self, d: Drain) -> Result<(), SE>; fn pathes_recursively(&self, basepath: PathBuf) -> Result<PathIterator, SE>; }
An abstraction trait over filesystem actions
Required Methods
fn remove_file(&self, path: &PathBuf) -> Result<(), SE>
fn copy(&self, from: &PathBuf, to: &PathBuf) -> Result<(), SE>
fn rename(&self, from: &PathBuf, to: &PathBuf) -> Result<(), SE>
fn create_dir_all(&self, _: &PathBuf) -> Result<(), SE>
fn exists(&self, _: &PathBuf) -> Result<bool, SE>
fn is_file(&self, _: &PathBuf) -> Result<bool, SE>
fn new_instance(&self, p: PathBuf) -> Box<FileAbstractionInstance>
fn drain(&self) -> Result<Drain, SE>
fn fill<'a>(&'a mut self, d: Drain) -> Result<(), SE>
fn pathes_recursively(&self, basepath: PathBuf) -> Result<PathIterator, SE>
Implementors
impl FileAbstraction for FSFileAbstraction
impl FileAbstraction for InMemoryFileAbstraction
impl<W: Write, M: Mapper> FileAbstraction for StdoutFileAbstraction<W, M>
impl<W: Write, M: Mapper> FileAbstraction for StdIoFileAbstraction<W, M>