1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Platform-optimized recursive directory walker.
//!
//! Captures file metadata (size, mtime, type) during enumeration without
//! separate `stat` calls per entry.
//!
//! # Quick start
//!
//! ```no_run
//! use dirwalk::{WalkBuilder, Sort};
//!
//! let result = WalkBuilder::new(".")
//! .max_depth(3)
//! .extensions(&["rs", "toml"])
//! .sort(Sort::Name)
//! .dirs_first(true)
//! .stats(true)
//! .build()
//! .unwrap();
//!
//! for entry in &result.entries {
//! println!("{}", entry.relative_path);
//! }
//!
//! if let Some(stats) = &result.stats {
//! println!("{} files, {} dirs", stats.file_count, stats.dir_count);
//! }
//! ```
//!
//! # Architecture
//!
//! The primary output is a flat `Vec<Entry>`. Tree structure is derived on
//! demand via [`tree::to_tree`].
//!
//! Platform-specific scanning backends live in the `scan` module, dispatched
//! at compile time via `#[cfg(target_os)]`. See that module's docs for
//! per-platform details.
//!
//! [`WalkBuilder`] supports sequential ([`WalkIter`]) and parallel (Rayon)
//! modes. Filters are applied during the walk, not post-hoc.
//!
//! ## Feature flags
//!
//! | Flag | Effect |
//! |------|--------|
//! | *(default)* | Library only, no CLI dependencies. |
//! | `serde` | `Serialize` impl on [`Entry`], pulls in `serde` + `serde_json`. |
//! | `cli` | Implies `serde`, adds `clap` and `csv` for the `dirwalk` binary. |
pub use Entry;
pub use Error;
pub use ;
pub use Sort;
pub use Threads;
pub use ;