MCPcopy Create free account
hub / github.com/CodeBendKit/codeseek / load_file_hashes

Method load_file_hashes

rust-core/src/storage/persistence.rs:159–171  ·  view source on GitHub ↗
(&self, project_id: &str)

Source from the content-addressed store, hash-verified

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);

Callers 1

_load_file_hashesMethod · 0.80

Calls 1

project_dirMethod · 0.80

Tested by

no test coverage detected