pub struct ScanConfig {
pub root: PathBuf,
pub follow_symlinks: bool,
pub cross_filesystems: bool,
pub apparent_size: bool,
pub max_depth: Option<u32>,
pub ignore_patterns: Vec<String>,
pub threads: usize,
pub include_hidden: bool,
pub compute_hashes: bool,
pub min_hash_size: u64,
/* private fields */
}Expand description
Configuration for scanning operations.
Fields§
§root: PathBufRoot path to scan.
follow_symlinks: boolFollow symbolic links.
cross_filesystems: boolCross filesystem boundaries.
apparent_size: boolUse apparent size vs disk usage.
max_depth: Option<u32>Maximum depth to traverse (None = unlimited).
ignore_patterns: Vec<String>Patterns to ignore (gitignore-style glob syntax via globset).
threads: usizeNumber of threads for scanning (0 = auto-detect).
Include hidden files (starting with .).
compute_hashes: boolCompute content hashes during scan.
min_hash_size: u64Minimum file size to hash (skip tiny files).
Implementations§
Source§impl ScanConfig
impl ScanConfig
Sourcepub fn builder() -> ScanConfigBuilder
pub fn builder() -> ScanConfigBuilder
Create a new scan config builder.
Sourcepub fn compile_patterns(&mut self)
pub fn compile_patterns(&mut self)
Compile ignore patterns into a GlobSet for efficient matching.
Call this after modifying ignore_patterns.
Sourcepub fn should_ignore(&self, name: &str) -> bool
pub fn should_ignore(&self, name: &str) -> bool
Check if a name should be ignored based on compiled glob patterns.
Sourcepub fn compiled_ignore_set(&self) -> Option<&GlobSet>
pub fn compiled_ignore_set(&self) -> Option<&GlobSet>
Return the compiled GlobSet for ignore patterns, if any.
This is the same set used internally by should_ignore. Useful when
callers need an owned, Send + Sync handle (e.g. for closures sent
to thread pools) without recompiling the patterns.
Check if hidden files should be skipped.
Trait Implementations§
Source§impl Clone for ScanConfig
impl Clone for ScanConfig
Source§fn clone(&self) -> ScanConfig
fn clone(&self) -> ScanConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more