pub fn walk_module_tree<E>(
root: &Path,
visitor: &mut dyn FnMut(&Path, u64) -> Result<(), E>,
) -> Result<TreeStats, WalkError<E>>Expand description
Walks every regular file under root, enforcing containment and
metadata exclusion. Calls visitor for each file with its path
and size. Returns aggregate statistics.
The walk enforces these rules.
- Entries named
.gitor.sprocketare skipped. - Any symbolic link is rejected with
ModuleWalkError::Symlink. - Only regular files are visited.