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

cargocargo add ignore

Methods

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.

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.