https://github.com/just-do-halee/collectfiles
Collects accurate files while running in parallel through directories. (Simple, Fast, Powerful)
https://github.com/just-do-halee/collectfiles
collect directory file parallel rayon regex simple walk
Last synced: 9 months ago
JSON representation
Collects accurate files while running in parallel through directories. (Simple, Fast, Powerful)
- Host: GitHub
- URL: https://github.com/just-do-halee/collectfiles
- Owner: just-do-halee
- License: apache-2.0
- Created: 2021-10-19T22:13:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-03T11:07:34.000Z (over 4 years ago)
- Last Synced: 2025-05-19T00:17:54.631Z (10 months ago)
- Topics: collect, directory, file, parallel, rayon, regex, simple, walk
- Language: Rust
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE_APACHE
Awesome Lists containing this project
README
## ***`collectfiles`***
---
Collects accurate files while running in parallel through directories. (Simple, Fast, Powerful)
[![CI][ci-badge]][ci-url]
[![Crates.io][crates-badge]][crates-url]
[![Licensed][license-badge]][license-url]
[![Twitter][twitter-badge]][twitter-url]
[ci-badge]: https://github.com/just-do-halee/collectfiles/actions/workflows/rust.yml/badge.svg
[crates-badge]: https://img.shields.io/crates/v/collectfiles.svg?labelColor=383636
[license-badge]: https://img.shields.io/crates/l/collectfiles?labelColor=383636
[twitter-badge]: https://img.shields.io/twitter/follow/do_halee?style=flat&logo=twitter&color=4a4646&labelColor=333131&label=just-do-halee
[ci-url]: https://github.com/just-do-halee/collectfiles/actions
[twitter-url]: https://twitter.com/do_halee
[crates-url]: https://crates.io/crates/collectfiles
[license-url]: https://github.com/just-do-halee/collectfiles
| [Docs](https://docs.rs/collectfiles) | [Latest Note](https://github.com/just-do-halee/collectfiles/blob/main/CHANGELOG.md) |
```toml
[dependencies]
collectfiles = "1.1.0"
```
---
# Example
```rust
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);
```