use std::path::Path;
use futures::future::BoxFuture;
use crate::Result;
pub trait AsyncWritableFileSystem {
fn create_dir(&self, dir: &Path) -> BoxFuture<'_, Result<()>>;
fn create_dir_all(&self, dir: &Path) -> BoxFuture<'_, Result<()>>;
fn write(&self, file: &Path, data: &[u8]) -> BoxFuture<'_, Result<()>>;
fn remove_file(&self, file: &Path) -> BoxFuture<'_, Result<()>>;
fn remove_dir_all(&self, dir: &Path) -> BoxFuture<'_, Result<()>>;
}
pub trait AsyncReadableFileSystem {
fn read(&self, file: &Path) -> BoxFuture<'_, Result<Vec<u8>>>;
}
pub trait AsyncFileSystem: AsyncReadableFileSystem + AsyncWritableFileSystem {}
impl<T: AsyncReadableFileSystem + AsyncWritableFileSystem> AsyncFileSystem for T {}