pub trait FileSystem: Send + Sync {
// Required methods
fn list_directory(&self, path: &Path) -> Result<Vec<EntryMetadata>>;
fn get_metadata(&self, path: &Path) -> Result<EntryMetadata>;
fn copy_file(&self, from: &Path, to: &Path) -> Result<()>;
fn create_directory(&self, path: &Path) -> Result<()>;
fn exists(&self, path: &Path) -> Result<bool>;
fn set_modified_time(&self, path: &Path, time: SystemTime) -> Result<()>;
}Required Methods§
fn list_directory(&self, path: &Path) -> Result<Vec<EntryMetadata>>
fn get_metadata(&self, path: &Path) -> Result<EntryMetadata>
fn copy_file(&self, from: &Path, to: &Path) -> Result<()>
fn create_directory(&self, path: &Path) -> Result<()>
fn exists(&self, path: &Path) -> Result<bool>
fn set_modified_time(&self, path: &Path, time: SystemTime) -> Result<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".