pub struct DuplicateOptions {
pub base_dirs: Vec<PathBuf>,
pub max_depth: u32,
pub mode: DuplicateMode,
pub algorithm: HashAlgorithm,
pub buffer_size: usize,
pub min_size: u64,
pub max_size: u64,
pub skip_binary: bool,
pub binary_check_bytes: usize,
pub include_patterns: Vec<String>,
pub exclude_dirs: Vec<String>,
pub max_results: usize,
}Expand description
All parameters for a duplicate-detection run.
Fields§
§base_dirs: Vec<PathBuf>One or more root directories to scan. At least one must be given. Files found across all roots are pooled together before grouping, so duplicates that live in different trees are detected correctly.
max_depth: u32Maximum recursion depth per directory (0 = only that directory).
mode: DuplicateModeDetection mode.
algorithm: HashAlgorithmHashing algorithm (only used in DuplicateMode::Content).
buffer_size: usizeRead buffer size for hashing (bytes).
min_size: u64Skip files smaller than this (bytes). 0 = include all.
max_size: u64Skip files larger than this (bytes). 0 = no limit.
skip_binary: boolSkip binary files.
binary_check_bytes: usizeBinary-check probe length.
include_patterns: Vec<String>Only include files matching these glob patterns (empty = all).
exclude_dirs: Vec<String>Directory names to skip entirely.
max_results: usizeCap results (0 = unlimited).
Implementations§
Source§impl DuplicateOptions
impl DuplicateOptions
Sourcepub fn from_config(cfg: &Config, base_dirs: Vec<PathBuf>) -> FsearchResult<Self>
pub fn from_config(cfg: &Config, base_dirs: Vec<PathBuf>) -> FsearchResult<Self>
Construct from a Config with explicit root directories.
Sourcepub fn builder(base_dirs: impl IntoDirs) -> DuplicateOptionsBuilder
pub fn builder(base_dirs: impl IntoDirs) -> DuplicateOptionsBuilder
Fluent builder — start with one or more directories.
Trait Implementations§
Source§impl Clone for DuplicateOptions
impl Clone for DuplicateOptions
Source§fn clone(&self) -> DuplicateOptions
fn clone(&self) -> DuplicateOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DuplicateOptions
impl RefUnwindSafe for DuplicateOptions
impl Send for DuplicateOptions
impl Sync for DuplicateOptions
impl Unpin for DuplicateOptions
impl UnsafeUnpin for DuplicateOptions
impl UnwindSafe for DuplicateOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more