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

Function unique_temp_dir

crates/openshell-driver-vm/src/rootfs.rs:1134–1145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1132 }
1133
1134 fn unique_temp_dir() -> PathBuf {
1135 static COUNTER: AtomicU64 = AtomicU64::new(0);
1136 let nanos = SystemTime::now()
1137 .duration_since(UNIX_EPOCH)
1138 .expect("time went backwards")
1139 .as_nanos();
1140 let suffix = COUNTER.fetch_add(1, Ordering::Relaxed);
1141 std::env::temp_dir().join(format!(
1142 "openshell-driver-vm-rootfs-test-{}-{nanos}-{suffix}",
1143 std::process::id()
1144 ))
1145 }
1146
1147 fn write_fake_runtime_binaries(rootfs: &Path) {
1148 fs::write(

Calls

no outgoing calls