Module ignore
Fast directory traversal respecting gitignore rules.
ignore provides recursive directory traversal
that automatically respects .gitignore and .ignore files.
It is the library that powers file matching in ripgrep.
The main entry point is WalkBuilder,
which configures and creates a directory walker.
For simple cases, Walk provides an iterator over matching files.
For parallel traversal, use WalkParallel.
This crate is useful when you need to walk a directory tree while respecting the same ignore rules that git uses.
Examples
Basic directory traversal respecting gitignore:
use Walk;
for result in new
Customizing the walker with WalkBuilder:
use WalkBuilder;
let walker = new
.hidden // Include hidden files
.git_ignore // Respect .gitignore
.max_depth // Limit depth
.build;
for result in walker