Skip to main content

FileSystem

Trait FileSystem 

Source
pub(crate) trait FileSystem: Send + Sync {
    // Required methods
    fn is_file(&self, path: &Path) -> bool;
    fn canonicalize(&self, path: &Path) -> Result<PathBuf>;
}
Expand description

Read-only probing of the filesystem.

Required Methods§

Source

fn is_file(&self, path: &Path) -> bool

Whether path exists and is a file.

Source

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

Resolves path to an absolute form with symlinks and .. removed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§