MCPcopy Create free account
hub / github.com/AI45Lab/Code / write

Function write

core/tests/test_agent_dir_convention.rs:12–16  ·  view source on GitHub ↗

Write `content` to `dir/rel`, creating parent dirs.

(dir: &Path, rel: &str, content: &str)

Source from the content-addressed store, hash-verified

10
11/// Write `content` to `dir/rel`, creating parent dirs.
12fn write(dir: &Path, rel: &str, content: &str) {
13 let path = dir.join(rel);
14 fs::create_dir_all(path.parent().unwrap()).unwrap();
15 fs::write(path, content).unwrap();
16}
17
18/// A realistic agent dir exercising every sub-convention at once.
19fn build_full_agent_dir() -> tempfile::TempDir {

Calls

no outgoing calls

Tested by

no test coverage detected