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§
Sourcefn read_to_string(&self, path: &Path) -> Result<String>
fn read_to_string(&self, path: &Path) -> Result<String>
Reads the given path as a string.