MCPcopy Create free account
hub / github.com/enowdev/enowX-Coder / with_sandbox

Function with_sandbox

src-tauri/src/tools/executor.rs:633–641  ·  view source on GitHub ↗
(test_name: &str)

Source from the content-addressed store, hash-verified

631 // ── Helpers ────────────────────────────────────────────────────────────────
632
633 fn with_sandbox(test_name: &str) -> PathBuf {
634 let base = PathBuf::from("/tmp");
635 let path = base.join(format!("enowx-test-{}", test_name));
636 if path.exists() {
637 std::fs::remove_dir_all(&path).expect("cleanup sandbox");
638 }
639 std::fs::create_dir_all(&path).expect("create sandbox");
640 path
641 }
642
643 fn cleanup(test_name: &str) {
644 let path = PathBuf::from("/tmp").join(format!("enowx-test-{}", test_name));

Calls

no outgoing calls