Function scan_directory
Source pub fn scan_directory<P: AsRef<Path>>(
root: P,
exclude_patterns: &[String],
compute_hash: bool,
) -> Result<Vec<FileInfo>, SyncError>
Expand description
递归遍历目录,返回所有文件和目录的 FileInfo 列表
Ok(Vec<FileInfo>): 扫描到的文件信息列表
Err(std::io::Error): 扫描过程中发生的 I/O 错误
此函数会跳过无法访问的文件或目录,并记录警告日志。