jwalk
Filesystem walk.
- Performed in parallel using rayon
- Entries streamed in sorted order
- Custom sort/filter/skip
Usage
Add this to your Cargo.toml
:
[]
= "0.2"
Lean More: docs.rs/jwalk
Example
Recursively iterate over the "foo" directory sorting by name:
use ;
for entry in new.sort
Inspiration
This crate is inspired by both walkdir
and
ignore
. It attempts to combine the
parallelism of ignore
with walkdir
's streaming iterator API.
Why use this crate?
This crate is particularly fast when you want streamed sorted results. In my
tests its about 4x walkdir
speed for sorted results with metadata. Also this
crate's process_entries
callback allows you to arbitrarily sort/filter/skip
entries before they are yielded.
Why not use this crate?
Directory traversal is already pretty fast. If you don't need this crate's speed
then walkdir
provides a smaller and more tested single threaded
implementation.
Benchmarks
Benchmarks
comparing this crate with jwalk
and ignore
.