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§

source

fn read_dir(&self, path: &Path) -> Result<ReadDir>

source

fn create_dir(&self, path: &Path) -> Result<()>

source

fn remove_dir(&self, path: &Path) -> Result<()>

source

fn rename(&self, from: &Path, to: &Path) -> Result<()>

source

fn metadata(&self, path: &Path) -> Result<Metadata>

source

fn remove_file(&self, path: &Path) -> Result<()>

source

fn new_open_options(&self) -> OpenOptions<'_>

Provided Methods§

This method gets metadata without following symlinks in the path. Currently identical to metadata because symlinks aren’t implemented yet.

Implementations§

source§

impl dyn FileSystem + 'static

source

pub fn downcast_ref<T: 'static>(&self) -> Option<&T>

source

pub fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T>

Implementors§

source§

impl FileSystem for ArcFileSystem

source§

impl FileSystem for EmptyFileSystem

source§

impl FileSystem for virtual_fs::host_fs::FileSystem

source§

impl FileSystem for virtual_fs::mem_fs::FileSystem

source§

impl FileSystem for PassthruFileSystem

source§

impl FileSystem for StaticFileSystem

source§

impl FileSystem for WebcVolumeFileSystem

source§

impl FileSystem for TmpFileSystem

source§

impl FileSystem for UnionFileSystem

source§

impl<D, F> FileSystem for Dwhere D: Deref<Target = F> + Debug + Send + Sync + 'static, F: FileSystem + ?Sized,

source§

impl<F> FileSystem for TraceFileSystem<F>where F: FileSystem,

source§

impl<P, S> FileSystem for OverlayFileSystem<P, S>where P: FileSystem + 'static, S: for<'a> FileSystems<'a> + Send + Sync + 'static,

source§

impl<T> FileSystem for WebcFileSystem<T>where T: Debug + Send + Sync + 'static + Deref<Target = WebC<'static>>,