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)
| 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 | /// |