create_zip

Function create_zip 

Source
pub fn create_zip<P: AsRef<Path>, Q: AsRef<Path>>(
    output: P,
    sources: &[Q],
    config: &CreationConfig,
) -> Result<CreationReport>
Expand description

Creates a ZIP archive.

§Examples

use exarch_core::creation::CreationConfig;
use exarch_core::creation::zip::create_zip;
use std::path::Path;

let config = CreationConfig::default();
let report = create_zip(Path::new("output.zip"), &[Path::new("src")], &config)?;
println!("Added {} files", report.files_added);

§Errors

Returns an error if:

  • Source path does not exist
  • Output file cannot be created
  • I/O error during archive creation