Skip to main content

write_archive

Function write_archive 

Source
pub fn write_archive(path: &Path, archive: &Archive) -> Result<()>
Expand description

Writes rows in the current archive format and syncs the file to disk.

Uses SAMPLE_SCHEMA and writer_properties (the same settings as the archiver) with the archive’s original key-value metadata. Rows are split into row groups of ROWS_PER_ROW_GROUP. An existing file at path is truncated.

§Arguments

  • path - Destination file, normally the temporary *.recompress-tmp path.
  • archive - Rows and metadata to write.

§Errors

Returns an error if the schema cannot be parsed, or if creating, writing, closing or syncing the file fails.