MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / create_test_dir

Function create_test_dir

rust/src/lock.rs:104–112  ·  view source on GitHub ↗
(prefix: &str)

Source from the content-addressed store, hash-verified

102 use std::time::{Duration, SystemTime, UNIX_EPOCH};
103
104 fn create_test_dir(prefix: &str) -> PathBuf {
105 let unique = SystemTime::now()
106 .duration_since(UNIX_EPOCH)
107 .unwrap()
108 .as_nanos();
109 let dir = std::env::temp_dir().join(format!("{}_{}", prefix, unique));
110 fs::create_dir_all(&dir).unwrap();
111 dir
112 }
113
114 #[test]
115 fn release_is_idempotent_and_removes_lock_file() {

Calls

no outgoing calls