gitignore 1.0.8

DEPRECATED, SEE README! Pereviously, an implementation of .gitignore file parsing and glob testing in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate gitignore;

use std::env;

/// Given a list of files, check the status of these files and whether they are excluded because
/// of the .gitignore rules in the current working directory.
pub fn main() {
    let pwd = env::current_dir().unwrap();
    let gitignore_path = pwd.join(".gitignore");
    let file = gitignore::File::new(&gitignore_path).unwrap();

    for arg in env::args().skip(1) {
        let path = pwd.join(&arg);
        let matches = file.is_excluded(&path).unwrap();
        println!("File: {}, Excluded: {}", arg, matches);
    }
}