Skip to main content

scan_dir

Function scan_dir 

Source
pub fn scan_dir(
    root: &Path,
    session: &SessionKeys,
    opts: &ScanOptions,
) -> Result<ScanResult>
Expand description

扫描一个目录。

§性能

每个文件只读 [PEEK_SIZE] 字节。session 中的 KEK 已派生完毕, 扫描过程不执行 Argon2。

§Errors

目录不存在或不可读时返回 Error::Io。单个文件的错误会被计入 ScanStats 并跳过,不中断整体扫描——一个坏文件不该让整次扫描失败。