Trait virtual_fs::FileSystem
source · pub trait FileSystem: Debug + Send + Sync + 'static + Upcastable {
// Required methods
fn read_dir(&self, path: &Path) -> Result<ReadDir>;
fn create_dir(&self, path: &Path) -> Result<()>;
fn remove_dir(&self, path: &Path) -> Result<()>;
fn rename(&self, from: &Path, to: &Path) -> Result<()>;
fn metadata(&self, path: &Path) -> Result<Metadata>;
fn remove_file(&self, path: &Path) -> Result<()>;
fn new_open_options(&self) -> OpenOptions<'_>;
// Provided method
fn symlink_metadata(&self, path: &Path) -> Result<Metadata> { ... }
}
Required Methods§
fn read_dir(&self, path: &Path) -> Result<ReadDir>
fn create_dir(&self, path: &Path) -> Result<()>
fn remove_dir(&self, path: &Path) -> Result<()>
fn rename(&self, from: &Path, to: &Path) -> Result<()>
fn metadata(&self, path: &Path) -> Result<Metadata>
fn remove_file(&self, path: &Path) -> Result<()>
fn new_open_options(&self) -> OpenOptions<'_>
Provided Methods§
sourcefn symlink_metadata(&self, path: &Path) -> Result<Metadata>
fn symlink_metadata(&self, path: &Path) -> Result<Metadata>
This method gets metadata without following symlinks in the path.
Currently identical to metadata
because symlinks aren’t implemented
yet.