use anyhow::Result;
#[async_trait::async_trait]
pub trait FileBackend: Send + Sync {
async fn read(
&self,
path: &str,
number: bool,
start_line: i32,
end_line: i32,
) -> Result<String>;
async fn write(&self, path: &str, content: &str, start_line: i32, end_line: i32) -> Result<()>;
async fn delete(&self, path: &str) -> Result<()>;
async fn search(&self, root: &str, pattern: &str, limit: i32) -> Result<String>;
async fn list(&self, path: &str) -> Result<String>;
async fn tree(&self, root: &str, level: i32) -> Result<String>;
async fn context(&self) -> Result<String>;
async fn mkdir(&self, path: &str) -> Result<()>;
async fn move_file(&self, from: &str, to: &str) -> Result<()>;
async fn find(&self, root: &str, name: &str, file_type: &str, limit: i32) -> Result<String>;
}