MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / project_device_selection_path_for_root

Function project_device_selection_path_for_root

packages/server/src/main.rs:2368–2374  ·  view source on GitHub ↗
(root: &Path)

Source from the content-addressed store, hash-verified

2366}
2367
2368fn project_device_selection_path_for_root(root: &Path) -> anyhow::Result<PathBuf> {
2369 let mut hasher = DefaultHasher::new();
2370 root.to_string_lossy().hash(&mut hasher);
2371 Ok(simdeck_user_state_dir()
2372 .join("default-devices")
2373 .join(format!("{:016x}.json", hasher.finish())))
2374}
2375
2376fn simdeck_user_state_dir() -> PathBuf {
2377 env::var_os("HOME")

Callers 2

Calls 1

simdeck_user_state_dirFunction · 0.85

Tested by

no test coverage detected