(&self, project_id: &str)
| 157 | } |
| 158 | |
| 159 | pub fn load_file_hashes(&self, project_id: &str) -> io::Result<HashMap<String, String>> { |
| 160 | let hash_file = self.project_dir(project_id).join("file_hashes.json"); |
| 161 | |
| 162 | if !hash_file.exists() { |
| 163 | return Ok(HashMap::new()); |
| 164 | } |
| 165 | |
| 166 | let content = fs::read_to_string(hash_file)?; |
| 167 | let hashes: HashMap<String, String> = serde_json::from_str(&content) |
| 168 | .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?; |
| 169 | |
| 170 | Ok(hashes) |
| 171 | } |
| 172 | |
| 173 | pub fn delete_project(&self, project_id: &str) -> io::Result<()> { |
| 174 | let project_dir = self.project_dir(project_id); |
no test coverage detected