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

Method export_v3_file

atomic-repository/src/redb_change_store/queries.rs:367–371  ·  view source on GitHub ↗

Export a change from redb to V3 `.change` file format. Reads all sections from redb and assembles a complete V3 change file. This is used for push/pull (network transfer) and `atomic export` (offline sharing).

(&self, hash: &[u8; 32], dest: P)

Source from the content-addressed store, hash-verified

365 /// file. This is used for push/pull (network transfer) and
366 /// `atomic export` (offline sharing).
367 pub fn export_v3_file<P: AsRef<Path>>(&self, hash: &[u8; 32], dest: P) -> RedbStoreResult<()> {
368 let bytes = self.export_v3_bytes(hash)?;
369 std::fs::write(dest, &bytes)?;
370 Ok(())
371 }
372
373 /// Export a change from redb to V3 bytes in memory.
374 ///

Callers 2

test_export_v3_fileFunction · 0.80

Calls 2

writeFunction · 0.85
export_v3_bytesMethod · 0.80

Tested by 2

test_export_v3_fileFunction · 0.64