pub trait PackContext {
// Required methods
fn list_files(&self, scope: &PackScope) -> Vec<Utf8PathBuf>;
fn read(&self, file: &Utf8Path) -> Result<String>;
fn modified(&self, file: &Utf8Path) -> Option<SystemTime>;
fn in_edges(&self, file: &Utf8Path) -> Result<usize>;
}Expand description
Abstracts filesystem access and metadata needed by the packer.
All path arguments use Utf8Path from the camino crate. Implementors
do not need to perform std::path conversions — the packer only operates
on UTF-8 paths.
Required Methods§
Sourcefn list_files(&self, scope: &PackScope) -> Vec<Utf8PathBuf>
fn list_files(&self, scope: &PackScope) -> Vec<Utf8PathBuf>
Return every file path that matches the given scope.
Sourcefn modified(&self, file: &Utf8Path) -> Option<SystemTime>
fn modified(&self, file: &Utf8Path) -> Option<SystemTime>
Return the last-modified timestamp of file, if available.