use async_trait::async_trait;
use crate::error::Result;
use crate::fs::options::{CreateFileOptions, DeleteOptions, OpenFileOptions};
use crate::fs::uri_status::URIStatus;
use crate::io::GooseFsFileInStream;
#[async_trait]
pub trait FileSystem: Send + Sync + 'static {
async fn get_status(&self, path: &str) -> Result<URIStatus>;
async fn list_status(&self, path: &str, recursive: bool) -> Result<Vec<URIStatus>>;
async fn exists(&self, path: &str) -> Result<bool>;
async fn open_file(&self, path: &str, options: OpenFileOptions) -> Result<GooseFsFileInStream>;
async fn create_file(
&self,
path: &str,
options: CreateFileOptions,
) -> Result<crate::io::GooseFsFileWriter>;
async fn mkdir(&self, path: &str, recursive: bool) -> Result<()>;
async fn delete(&self, path: &str, options: DeleteOptions) -> Result<()>;
async fn rename(&self, src: &str, dst: &str) -> Result<()>;
}