use std::path::Path;
use super::Result;
pub trait WritableFileSystem {
fn create_dir(&self, dir: &Path) -> Result<()>;
fn create_dir_all(&self, dir: &Path) -> Result<()>;
fn write(&self, file: &Path, data: &[u8]) -> Result<()>;
}
pub trait ReadableFileSystem {
fn read(&self, file: &Path) -> Result<Vec<u8>>;
}
pub trait FileSystem: ReadableFileSystem + WritableFileSystem {}
impl<T: ReadableFileSystem + WritableFileSystem> FileSystem for T {}