pub struct ScanOptions {
pub max_depth: Option<usize>,
pub include_hidden: bool,
pub one_file_system: bool,
pub threads: usize,
pub exclude_patterns: Vec<String>,
pub follow_symlinks: bool,
pub cache: Option<ScanCacheOptions>,
}Expand description
Configuration options for directory scanning operations.
Fields§
§max_depth: Option<usize>Maximum depth to recurse (None = unlimited)
Include hidden files/directories (starting with .)
one_file_system: boolStay on the same filesystem (don’t cross mount points)
threads: usizeNumber of parallel threads (0 = auto)
exclude_patterns: Vec<String>Paths to exclude (glob patterns)
follow_symlinks: boolFollow symbolic links
cache: Option<ScanCacheOptions>Optional persistent file-metadata cache.
Implementations§
Source§impl ScanOptions
impl ScanOptions
Sourcepub fn is_linux_virtual_fs(path: &Path) -> bool
pub fn is_linux_virtual_fs(path: &Path) -> bool
Check if a path should be excluded based on Linux virtual filesystem paths
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Set maximum recursion depth
Set whether to include hidden files
Sourcepub fn with_one_file_system(self, enabled: bool) -> Self
pub fn with_one_file_system(self, enabled: bool) -> Self
Set whether to stay on the same filesystem
Sourcepub fn with_threads(self, threads: usize) -> Self
pub fn with_threads(self, threads: usize) -> Self
Set number of parallel threads
Sourcepub fn with_exclude(self, patterns: Vec<String>) -> Self
pub fn with_exclude(self, patterns: Vec<String>) -> Self
Set exclusion patterns
Sourcepub fn with_follow_symlinks(self, follow: bool) -> Self
pub fn with_follow_symlinks(self, follow: bool) -> Self
Set whether to follow symbolic links
Sourcepub fn with_cache(self, path: PathBuf, ttl_seconds: u64) -> Self
pub fn with_cache(self, path: PathBuf, ttl_seconds: u64) -> Self
Enable persistent metadata caching at path.
Sourcepub fn default_cache_path() -> Option<PathBuf>
pub fn default_cache_path() -> Option<PathBuf>
Default per-user cache location.
Trait Implementations§
Source§impl Clone for ScanOptions
impl Clone for ScanOptions
Source§impl Debug for ScanOptions
impl Debug for ScanOptions
Auto Trait Implementations§
impl Freeze for ScanOptions
impl RefUnwindSafe for ScanOptions
impl Send for ScanOptions
impl Sync for ScanOptions
impl Unpin for ScanOptions
impl UnsafeUnpin for ScanOptions
impl UnwindSafe for ScanOptions
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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