pub trait FileSystem {
// Required methods
fn canonicalize_path<'a>(path: &'a Path) -> Cow<'a, Path>;
fn file_content_utf8<P: AsRef<Path>>(
&self,
path: P,
) -> Result<String, Error>;
fn glob(&self, pattern: &str) -> Result<Vec<PathBuf>, LoadError>;
}
Expand description
Interface to abstract file system. Normally you want to use ProdFileSystem.
Required Methods§
Sourcefn canonicalize_path<'a>(path: &'a Path) -> Cow<'a, Path>
fn canonicalize_path<'a>(path: &'a Path) -> Cow<'a, Path>
canonicalize the given path.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.