Skip to content

Rust crate which provides direct access to files within a Debian archive

License

Notifications You must be signed in to change notification settings

pop-os/debarchive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
}

About

Rust crate which provides direct access to files within a Debian archive

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages