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

Method new

atomic-cli/src/commands/git/watch.rs:674–686  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

672
673 impl TestDirectory {
674 fn new() -> Self {
675 let unique = std::time::SystemTime::now()
676 .duration_since(std::time::UNIX_EPOCH)
677 .unwrap()
678 .as_nanos();
679 let sequence = TEST_DIRECTORY_SEQUENCE.fetch_add(1, Ordering::Relaxed);
680 let path = std::env::temp_dir().join(format!(
681 "atomic-shim-watch-{}-{unique}-{sequence}",
682 std::process::id()
683 ));
684 fs::create_dir(&path).unwrap();
685 Self(path)
686 }
687 }
688
689 impl Drop for TestDirectory {

Callers

nothing calls this directly

Calls 2

temp_dirFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected