collectfiles

Crates.iocollectfiles
lib.rscollectfiles
version1.1.0
sourcesrc
created_at2021-10-19 22:29:53.814712
updated_at2021-12-03 11:07:09.922412
descriptionCollects accurate files while running in parallel through directories. (Simple, Fast, Powerful)
homepagehttps://github.com/just-do-halee/collectfiles
repositoryhttps://github.com/just-do-halee/collectfiles
max_upload_size
id467564
size25,344
Doha Lee (just-do-halee)

documentation

https://docs.rs/collectfiles

README

collectfiles


Collects accurate files while running in parallel through directories. (Simple, Fast, Powerful)

CI Crates.io Licensed Twitter

| Docs | Latest Note |

[dependencies]
collectfiles = "1.1.0"

Example

use collectfiles::*;

let vec = CollectFiles("/Users/hwakyeom/programs/")
        .with_depth(1)
        .with_target_regex(".md$")
        .with_hook(|path| path.with_extension("mutated"))
        .with_unwrap_or_else(|e| {
            if e.kind() == io::ErrorKind::NotFound {
                PathBuf::from("/Users/other/")
            } else {
               panic!("{:?}", e)
            }
        })
        .collect();

println!("{:#?}", vec);
Commit count: 3

cargo fmt