pub fn current_hashes(
content_dir: &Path,
template_dir: &Path,
) -> Result<HashMap<PathBuf, String>, SsgError>Expand description
Walks every tracked source on disk and returns
path → sha256(content). Used by DepGraph::diff on the
incremental hot path. Sources that disappear silently drop out.
§Examples
use ssg::depgraph::current_hashes;
use tempfile::tempdir;
use std::fs;
let dir = tempdir().unwrap();
let content = dir.path().join("content");
let templates = dir.path().join("templates");
fs::create_dir(&content).unwrap();
fs::create_dir(&templates).unwrap();
let map = current_hashes(&content, &templates).unwrap();
assert!(map.is_empty());