[go: up one dir, main page]

tar 0.4.9

A Rust implementation of a TAR file reader and writer. This library does not currently handle compression, but it is abstract over all I/O readers and writers. Additionally, great lengths are taken to ensure that the entire contents are never required to be entirely resident in memory all at once.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
extern crate tar;

use std::fs::File;
use tar::Builder;

fn main() {
    let file = File::create("foo.tar").unwrap();
    let mut a = Builder::new(file);

    a.append_path("README.md").unwrap();
    a.append_file("lib.rs", &mut File::open("src/lib.rs").unwrap()).unwrap();
}