write_one_file

Function write_one_file 

Source
pub fn write_one_file(
    input: &mut File,
    info: &FileInfo,
    output_directory: &Path,
    overwrite: bool,
    progress_cb: impl FnMut(Progress<'_>),
) -> Result<()>
Expand description

Copies one gzip file described by info from the concatenated gzip input

The filename will be info.filename with .gz appended. Any /, \, or NUL byte in the resulting filename will be replaced with an underscore to prevent directory traversal attacks.

ยงErrors

If this function encounters any form of I/O or other error except interruption by a signal, an adequate error variant will be returned. The position in input is undefined.

Interruption by a signal instead causes progress_cb to be called with Progress::ProgressStep.