API Reference
ignore
A fast recursive directory traversal in Rust that respects gitignore files and hidden files.
Official Documentation ↗CompatibilityThis documentation covers version
v0.4. Check the official docs for the latest API surface.Installation
cargo
cargo add ignoreMethods
No methods match this filter.
ignore powers ripgrep and builds a parallel-aware walker that honors ignore files.
Key Features
- Honors .gitignore and global ignore files
- Parallel walking support
- Custom ignore files and overrides
Usage Notes
Pin a version and check the official docs for the API surface you depend on before upgrading.
Errors
The following points are quoted verbatim from the official documentation. 来源:https://docs.rs/ignore/latest/ignore/ · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:50:23.567Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.
- Structs § DirEntry A directory entry with a possible error attached. (https://docs.rs/ignore/latest/ignore/)
- Enums § Error Represents an error that can occur when parsing a gitignore file. (https://docs.rs/ignore/latest/ignore/)
FAQ
- How is it different from WalkDir?
- WalkDir uses std filesystem iteration, while ignore adds gitignore, hidden file, and parallel traversal semantics.
- How do I disable all filters?
- Call standard_filters(false) to walk every path regardless of gitignore and hidden status.
- Can it walk in parallel?
- Yes. Set the threads option on the builder to traverse with multiple threads for large trees.
Report a problem with this API docOpens a pre-filled issue on GitHub.