pub struct AnalyzeBuilder { /* private fields */ }Implementations§
Source§impl AnalyzeBuilder
impl AnalyzeBuilder
Sourcepub fn extensions(
self,
exts: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn extensions( self, exts: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Only files with one of these extensions (case-insensitive, without the leading dot) are matched. Unset matches any extension, including files with none.
Sourcepub fn exclude_globs(
self,
patterns: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn exclude_globs( self, patterns: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Glob patterns (matched against the path relative to the analyzed root) that prune traversal entirely — an excluded directory is never descended into, not merely omitted from the report.
pub fn min_size(self, bytes: u64) -> Self
pub fn max_size(self, bytes: u64) -> Self
Sourcepub fn modified_after(self, t: SystemTime) -> Self
pub fn modified_after(self, t: SystemTime) -> Self
Only files modified at or after t are matched. A file with no
readable modified time never matches once this is set.
Sourcepub fn modified_before(self, t: SystemTime) -> Self
pub fn modified_before(self, t: SystemTime) -> Self
Only files modified at or before t are matched. A file with no
readable modified time never matches once this is set.
Sourcepub fn max_depth(self, depth: usize) -> Self
pub fn max_depth(self, depth: usize) -> Self
Bounds how far the walk descends: the analyzed root is depth 0,
its immediate children depth 1, and so on — passed straight
through to walkdir’s own max_depth, which prunes traversal
past the bound rather than filtering after the fact.
Sourcepub fn follow_symlinks(self, follow: bool) -> Self
pub fn follow_symlinks(self, follow: bool) -> Self
Off by default. When enabled, walkdir’s own loop detection
surfaces a symlink cycle as a per-entry error, handled like any
other error via .on_error().
Sourcepub fn top_n_largest(self, n: usize) -> Self
pub fn top_n_largest(self, n: usize) -> Self
How many of the largest matched files to keep in
AnalysisReport::largest_files. 0 disables the tracking
entirely.
Sourcepub fn detect_mime_types(self, enable: bool) -> Self
pub fn detect_mime_types(self, enable: bool) -> Self
Off by default — sniffing every matched file’s header via infer
is an extra read per file, on top of the metadata walkdir
already reads for every entry.
pub fn on_error(self, strategy: AnalysisErrorStrategy) -> Self
Sourcepub fn max_reported_errors(self, n: usize) -> Self
pub fn max_reported_errors(self, n: usize) -> Self
Caps AnalysisReport::errors; AnalysisReport::errors_total
stays uncapped regardless of this setting.