pgarchive 0.4.1

Read PostgreSQL custom format archives
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use pgarchive::Archive;
use std::env;
use std::fs::File;

fn main() {
    let args: Vec<String> = env::args().collect();

    for path in args.into_iter().skip(1) {
        println!("Checking {}", path);
        let mut file = File::open(path).unwrap();
        match Archive::parse(&mut file) {
            Ok(hdr) => println!("{:?}", hdr),
            Err(e) => println!("can not read file: {:?}", e),
        };
    }
}