pub struct ScanOptions {
pub recursive: bool,
pub max_depth: usize,
pub follow_symlinks: bool,
pub extension_filter: Option<String>,
pub max_files: usize,
}Expand description
扫描配置。
Fields§
§recursive: bool是否递归子目录。
max_depth: usize最大递归深度(recursive 为真时生效),防止符号链接环导致无限递归。
follow_symlinks: bool是否跟随符号链接。默认 false——跟随会带来环路与越权读取风险。
extension_filter: Option<String>只检查扩展名匹配的文件。为 None 时检查所有文件(伪装文件没有 .omy 扩展名)。
max_files: usize单次扫描的文件数上限,防止误选巨大目录导致界面卡死。
Implementations§
Source§impl ScanOptions
impl ScanOptions
Trait Implementations§
Source§impl Clone for ScanOptions
impl Clone for ScanOptions
Source§impl Debug for ScanOptions
impl Debug for ScanOptions
Auto Trait Implementations§
impl Forget for ScanOptions
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