MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / unique_temp_dir

Function unique_temp_dir

crates/openshell-driver-vm/src/driver.rs:6742–6753  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6740 }
6741
6742 fn unique_temp_dir() -> PathBuf {
6743 static COUNTER: AtomicU64 = AtomicU64::new(0);
6744 let nanos = SystemTime::now()
6745 .duration_since(UNIX_EPOCH)
6746 .unwrap()
6747 .as_nanos();
6748 let suffix = COUNTER.fetch_add(1, Ordering::Relaxed);
6749 std::env::temp_dir().join(format!(
6750 "openshell-vm-driver-test-{}-{nanos}-{suffix}",
6751 std::process::id()
6752 ))
6753 }
6754
6755 fn spawn_exited_child() -> Child {
6756 Command::new("sh")

Calls

no outgoing calls