parcel_resolver

Trait FileSystem

Source
pub trait FileSystem: Send + Sync {
    // Required methods
    fn read_to_string(&self, path: &Path) -> Result<String>;
    fn kind(&self, path: &Path) -> FileKind;
    fn read_link(&self, path: &Path) -> Result<PathBuf>;
}
Expand description

A trait that provides the functions needed to read files and retrieve metadata from a file system.

Required Methods§

Source

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

Reads the given path as a string.

Source

fn kind(&self, path: &Path) -> FileKind

Returns the kind of file or directory that the given path represents.

Returns the resolution of a symbolic link.

Implementors§