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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// <FILE>crates/fast-fs/src/lib.rs</FILE> - <DESC>Entry point re-exporting OFPF modules</DESC>
// <VERS>VERSION: 0.10.0</VERS>
// <WCTX>Preparing for crates.io release</WCTX>
// <CLOG>Added missing_docs lint, improved crate-level documentation</CLOG>
//! High-speed async file system traversal and navigation library.
//!
//! `fast-fs` provides two main capabilities:
//!
//! 1. **Directory Reading Functions** - Simple async functions for traversing directories
//! 2. **Navigation Module ([`nav`])** - A batteries-included file browser state machine
//!
//! # Quick Start
//!
//! ```no_run
//! use fast_fs::{read_dir, read_dir_recursive, TraversalOptions};
//!
//! # async fn example() -> Result<(), fast_fs::Error> {
//! // Read a single directory
//! let files = read_dir("/path/to/dir").await?;
//!
//! // Recursive with options
//! let options = TraversalOptions::default()
//! .with_max_depth(3)
//! .with_extensions(&["rs", "toml"]);
//! let all_files = read_dir_recursive("/project", options).await?;
//!
//! for file in all_files {
//! println!("{}: {} bytes", file.name, file.size);
//! }
//! # Ok(())
//! # }
//! ```
//!
//! # File Browser Component
//!
//! For building file pickers, save dialogs, and project explorers, see the [`nav`] module:
//!
//! ```no_run
//! use fast_fs::nav::{Browser, BrowserConfig, KeyInput, ActionResult};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let config = BrowserConfig::open_dialog();
//! let mut browser = Browser::new(config).await?;
//!
//! // Handle key input
//! match browser.handle_key(KeyInput::Down).await {
//! ActionResult::Done => { /* re-render */ }
//! ActionResult::FileSelected(path) => println!("Selected: {}", path.display()),
//! _ => {}
//! }
//! # Ok(())
//! # }
//! ```
//!
//! # Feature Highlights
//!
//! - **Async I/O** - Non-blocking traversal using tokio
//! - **Streaming API** - Memory-efficient traversal with backpressure
//! - **Gitignore Support** - Built-in `.gitignore` and `.ignore` pattern matching
//! - **Vim-style Navigation** - Configurable key bindings
//! - **Multi-Selection** - Range selection with Shift+Arrow
//! - **Framework-Agnostic** - You handle rendering, we handle state
// Re-export domain types
pub use Error;
pub use GitignoreMatcher;
pub use FileEntry;
pub use FileList;
pub use SortBy;
pub use TraversalOptions;
// Re-export functions (Flattened API)
pub use is_ignored;
pub use read_dir;
pub use read_dir_recursive;
pub use read_dir_stream;
pub use read_dir_visible;
/// Result type for fast-fs operations
pub type Result<T> = Result;
// <FILE>crates/fast-fs/src/lib.rs</FILE>
// <VERS>END OF VERSION: 0.9.0</VERS>