Skip to main content

Module traversal

Module traversal 

Source
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§

WalkEntry

Enums§

TraversalError

Functions§

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_DIRS components. Output Vec is sorted by construction (entries are pre-sorted by path).
walk_directory
Walk a directory with support for .gitignore and .ignore. max_depth=0 maps to unlimited recursion (None), positive values limit depth. The returned entries are sorted lexicographically by path.