MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / service_metadata_paths

Function service_metadata_paths

packages/server/src/main.rs:2384–2397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2382}
2383
2384fn service_metadata_paths() -> anyhow::Result<Vec<PathBuf>> {
2385 let dir = env::temp_dir().join("simdeck");
2386 if !dir.exists() {
2387 return Ok(Vec::new());
2388 }
2389 let mut paths = Vec::new();
2390 for entry in fs::read_dir(&dir).with_context(|| format!("read {}", dir.display()))? {
2391 let path = entry?.path();
2392 if path.extension().and_then(|value| value.to_str()) == Some("json") {
2393 paths.push(path);
2394 }
2395 }
2396 Ok(paths)
2397}
2398
2399fn service_metadata_by_path() -> anyhow::Result<HashMap<PathBuf, ServiceMetadata>> {
2400 let mut metadata_by_path = HashMap::new();

Callers 2

kill_all_servicesFunction · 0.85
service_metadata_by_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected