[go: up one dir, main page]

tar 0.4.4

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
13
14
15
16
17
18
fn main() {
    d("foo/");
    d("foo/.");
    d("foo");
}

fn d(s: &str) {
    let s = std::path::Path::new(s);
    println!("===============================\nwut -- {:?}", s);
    let mut it = s.components();
    for p in &mut it {
        println!("{:?}", p);
    }
    println!("{:?}", it.as_path());
    println!("{:?}", s.ends_with("."));
    println!("{:?}", s.file_name());
    println!("{:?}", s.with_file_name("a"));
}