批量更新多个文件
(&mut self, file_paths: &[PathBuf])
| 95 | |
| 96 | /// 批量更新多个文件 |
| 97 | pub fn refresh_files(&mut self, file_paths: &[PathBuf]) -> Result<(), String> { |
| 98 | info!("Refreshing {} files", file_paths.len()); |
| 99 | |
| 100 | let mut errors = Vec::new(); |
| 101 | for file_path in file_paths { |
| 102 | if let Err(e) = self.refresh_file(file_path) { |
| 103 | errors.push(format!("{}: {}", file_path.display(), e)); |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | if !errors.is_empty() { |
| 108 | Err(format!("Failed to refresh some files:\n{}", errors.join("\n"))) |
| 109 | } else { |
| 110 | Ok(()) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | /// 获取仓库统计信息 |
| 115 | pub fn get_repository_stats(&self) -> RepositoryStats { |
nothing calls this directly
no test coverage detected