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

Function write

libatomic/examples/replication_acceptance/fixture.rs:27–32  ·  view source on GitHub ↗
(root: &Path, path: &str, bytes: &[u8])

Source from the content-addressed store, hash-verified

25 pub public_key: Vec<u8>,
26}
27fn write(root: &Path, path: &str, bytes: &[u8]) -> Result<()> {
28 let path = root.join(path);
29 fs::create_dir_all(path.parent().unwrap())?;
30 fs::write(path, bytes)?;
31 Ok(())
32}
33fn source_hash(fm: &Map<String, Value>, body: &str) -> String {
34 let mut h = blake3::Hasher::new();
35 h.update(serde_json::to_string(fm).unwrap().as_bytes());

Callers 7

recordFunction · 0.70
runFunction · 0.70
mainFunction · 0.70
pushFunction · 0.70
createFunction · 0.70
orphanFunction · 0.70
prepare_fixturesFunction · 0.50

Calls 2

parentMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected