pub trait FileLoader {
// Required methods
fn file_exists(&self, path: &Path) -> bool;
fn read_file(&self, path: &Path) -> Result<String>;
fn read_binary_file(&self, path: &Path) -> Result<Arc<[u8]>>;
}
Expand description
An abstraction over the fs operations used by the Parser.
SourceQuery the existence of a file.
SourceRead the contents of a UTF-8 file into memory. This function must return a String because we normalize source files, which may require resizing.
SourceRead the contents of a potentially non-UTF-8 file into memory. We donât normalize binary files, so we can start in an Arc.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4