debarchive

Crates.iodebarchive
lib.rsdebarchive
version0.2.1
sourcesrc
created_at2018-10-03 20:48:25.937745
updated_at2021-08-05 14:36:29.497992
descriptionDebian archive reader / extractor
homepage
repositoryhttps://github.com/pop-os/debarchive
max_upload_size
id87886
size12,173
Michael Murphy (mmstick)

documentation

README

debarchive

This Rust crate provides direct access to files within a Debian archive. This crate is used by our debrep utility to generate the Packages and Contents files for generated apt repositories.

Features

  • Reading files from archives
  • Extracting files from archives
  • Writing new debian archives

Examples

extern crate debarchive;

use debarchive::Archive;
use std::path::Path;

fn main() {
    let path = &Path::new("name_version_arch.deb");
    let archive = Archive::new(path).unwrap();
    archive.data(|entry| {
        if let Ok(path) = entry.path() {
            println!("data: {}", path.display());
        }
    });

    let control_map = archive.control_map().unwrap();
    println!("Control: {:#?}", control_map);
}
Commit count: 3

cargo fmt