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

Method load_registry

rust-core/src/storage/persistence.rs:232–241  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

230 }
231
232 fn load_registry(&self) -> io::Result<ProjectsRegistry> {
233 let path = self.registry_path();
234 if !path.exists() {
235 return Ok(ProjectsRegistry::default());
236 }
237 let content = fs::read_to_string(path)?;
238 let reg: ProjectsRegistry = serde_json::from_str(&content)
239 .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
240 Ok(reg)
241 }
242
243 fn save_registry(&self, registry: &ProjectsRegistry) -> io::Result<()> {
244 let path = self.registry_path();

Callers 5

delete_projectMethod · 0.80
register_projectMethod · 0.80
is_project_parsedMethod · 0.80
find_project_by_dirMethod · 0.80
list_parsed_projectsMethod · 0.80

Calls 1

registry_pathMethod · 0.80

Tested by

no test coverage detected