MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / record_file

Function record_file

atomic-cli/tests/it/remove_recorded_path_test.rs:68–72  ·  view source on GitHub ↗

Track and record a file, so its content — not merely its name — is in the graph.

(root: &Path, name: &str, bytes: &[u8])

Source from the content-addressed store, hash-verified

66
67/// Track and record a file, so its content — not merely its name — is in the graph.
68fn record_file(root: &Path, name: &str, bytes: &[u8]) {
69 fs::write(root.join(name), bytes).unwrap();
70 cli(root, &["add", name]);
71 cli(root, &["record", "-m", &format!("record {name}"), name]);
72}
73
74fn change_count(root: &Path) -> usize {
75 cli(root, &["log", "-f", "oneline"])

Calls 3

writeFunction · 0.70
cliFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected