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

Method new

atomic-cli/src/commands/git/shim.rs:3476–3488  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3474
3475 impl TestDirectory {
3476 fn new() -> Self {
3477 let unique = SystemTime::now()
3478 .duration_since(UNIX_EPOCH)
3479 .unwrap()
3480 .as_nanos();
3481 let sequence = TEST_DIRECTORY_SEQUENCE.fetch_add(1, Ordering::Relaxed);
3482 let path = std::env::temp_dir().join(format!(
3483 "atomic-shim-collision-{}-{unique}-{sequence}",
3484 std::process::id()
3485 ));
3486 fs::create_dir(&path).unwrap();
3487 Self(path)
3488 }
3489 }
3490
3491 impl Drop for TestDirectory {

Callers

nothing calls this directly

Calls 2

temp_dirFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected