Expand description
Directory traversal with .gitignore support.
Provides recursive directory walking with automatic filtering based on .gitignore and .ignore files.
Uses the ignore crate for cross-platform, efficient file system traversal.
Structs§
Enums§
Functions§
- changed_
files_ from_ git_ ref - Return the set of absolute paths changed relative to
git_refin the repository containingdir. Invokes git without shell interpolation. - filter_
entries_ by_ git_ ref - Filter walk entries to only those that are either changed files or ancestor directories of changed files. This preserves the tree structure while limiting analysis scope.
- subtree_
counts_ from_ entries - Compute files-per-depth-1-subdirectory counts from an already-collected entry list.
Returns a Vec of (depth-1 path, file count) sorted by path.
Only counts file entries (not directories); skips entries containing
EXCLUDED_DIRScomponents. Output Vec is sorted by construction (entries are pre-sorted by path). - walk_
directory - Walk a directory with support for
.gitignoreand.ignore.max_depth=0maps to unlimited recursion (None), positive values limit depth. The returned entries are sorted lexicographically by path.