/// file entries are filtered out.
file entries are filtered out.
file entries are filtered out .
fn write_ignore_file<P: AsRef<Path>>(path: P) -> std::io::Result<()> {
    let mut ignore = IgnoreList::new();
    ignore.push(".env");
    ignore.push("metadata.yml");
    let mut gitignore = OpenOptions::new()
        .write(true)
        .append(true)
        .create(true)
        .open(&path)?;
    // let mut gitignore = File::create(&path)?;
    let ignore: String = match File::open(&path) {
        Err(err) => return Err(err),
        Ok(file) => ignore.format_existing(BufReader::new(file)),
    };
    gitignore.write_all(ignore.as_bytes())?;
    Ok(())
}
fn write_ignore_file < P : AsRef < Path > > ( path : P ) -> std :: io :: Result < ( ) > { let mut ignore = IgnoreList :: new ( ) ; ignore . push ( " " ) ; ignore . push ( " " ) ; let mut gitignore = OpenOptions :: new ( ) . write ( true ) . append ( true ) . create ( true ) . open ( & path ) ? ; // let mut gitignore = File::create(&path)?; let ignore : String = match File :: open ( & path ) { Err ( err ) => return Err ( err ) , Ok ( file ) => ignore . format_existing ( BufReader :: new ( file ) ) , } ; gitignore . write_all ( ignore . as_bytes ( ) ) ? ; Ok ( ( ) ) }
file entries are filtered out.
file entries are filtered out .
path
P