pub struct WalkOptions {
pub max_depth: Option<usize>,
pub min_depth: Option<usize>,
pub max_filesize: Option<u64>,
pub entry_types: EntryTypes,
pub respect_gitignore: bool,
pub include_hidden: bool,
pub filter: IncludeExclude,
pub follow_symlinks: bool,
pub on_error: Option<Arc<dyn Fn(&Path, &WalkerError) + Sync + Send>>,
pub types: Option<Arc<Types>>,
}Expand description
Options for file walking.
Fields§
§max_depth: Option<usize>Maximum depth to recurse (None = unlimited).
min_depth: Option<usize>Suppress yielding entries whose containing directory is at depth less
than this. Descent is unaffected — deeper entries are still found.
None and Some(0) are equivalent (yield everything).
max_filesize: Option<u64>Skip files whose size exceeds this many bytes. Files for which the
underlying WalkerFs::file_size returns None (size unknown) are
always yielded regardless of the limit.
entry_types: EntryTypesTypes of entries to include.
respect_gitignore: boolRespect .gitignore files and default ignores.
Include hidden files (starting with .).
filter: IncludeExcludeInclude/exclude filters.
follow_symlinks: boolFollow symbolic links into directories (default false).
When false, symlink directories are yielded as files rather than recursed.
When true, cycle detection prevents infinite loops.
on_error: Option<Arc<dyn Fn(&Path, &WalkerError) + Sync + Send>>Optional callback for non-fatal errors (unreadable dirs, bad .gitignore).
Default None silently skips errors (preserving original behavior).
types: Option<Arc<Types>>File-type filter using ripgrep’s ignore::types::Types.
Builds e.g. with TypesBuilder::new().add_defaults().select("rust").
Pure path-name matching — no I/O.
Trait Implementations§
Source§impl Clone for WalkOptions
impl Clone for WalkOptions
Source§fn clone(&self) -> WalkOptions
fn clone(&self) -> WalkOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more