use std::{fs::Metadata, path::Path};
use crate::Error;
pub trait File: Sized {
async fn open_for_writing(path: &Path) -> Result<Self, Error>;
async fn read_to_string(path: &Path) -> Result<String, std::io::Error>;
async fn metadata(path: &Path) -> Result<Metadata, Error>;
async fn remove_file(path: &Path) -> Result<(), Error>;
async fn get_length(&self) -> Result<u64, Error>;
async fn truncate(&mut self) -> Result<(), Error>;
async fn rename(&mut self, path: &Path) -> Result<(), Error>;
async fn sync_all(&mut self) -> Result<(), Error>;
async fn write_all<'a>(&'a mut self, src: &'a [u8]) -> Result<(), Error>;
}