dirwalk 1.1.1

Platform-optimized recursive directory walker with metadata
Documentation
//! 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. |

mod entry;
mod error;
mod filter;
pub mod group;
#[cfg(feature = "cli")]
pub mod output;
mod scan;
pub mod sort;
mod threads;
pub mod tree;
pub mod util;
mod walk;

pub use entry::Entry;
pub use error::Error;
pub use scan::{scan_dir, scan_dir_with_hint};
pub use sort::Sort;
pub use threads::Threads;
pub use walk::{Stats, StorageHint, WalkBuilder, WalkIter, WalkResult};