MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / scratch_dir

Function scratch_dir

atomic-cli/src/commands/intent/key_cache.rs:205–212  ·  view source on GitHub ↗
(tag: &str)

Source from the content-addressed store, hash-verified

203 const KEY: &str = "H2AM5IDITAWB5LBSKMNOCVKOUL4ZUS5GHGEHHEGESOTUYCOC4HJA";
204
205 fn scratch_dir(tag: &str) -> PathBuf {
206 let tmp = std::env::var("TMPDIR").unwrap_or_else(|_| "/tmp".to_string());
207 let dir = PathBuf::from(&tmp)
208 .join("atomic-key-cache-test")
209 .join(format!("{tag}-{}", uuid::Uuid::new_v4()));
210 std::fs::create_dir_all(&dir).unwrap();
211 dir
212 }
213
214 #[test]
215 fn empty_cache_serves_nothing() {

Calls 1

unwrapMethod · 0.45