Skip to main content

aqc_filetree/
lib.rs

1//! Walk one filesystem directory root, return a [`FileTree`].
2//!
3//! No Git commands, no file reads, no parsing, no product policy. Two phases:
4//! phase 1 is gitignore-aware; phase 2 (opt-in via [`RecoveryRules`]) walks
5//! WITHOUT gitignore and recovers specific paths from ignored trees, tagged
6//! [`EntryOrigin::Recovered`]. Contract: `plan.md` in this directory.
7
8#![expect(
9    clippy::type_complexity,
10    reason = "Result<Vec<...>, Error> return shapes exceed the strict workspace threshold; the shapes are the crate's declared contract, stated openly rather than aliased away."
11)]
12
13// Dev-dependency linked into the lib's test build but exercised only by the
14// integration tests in `tests/`.
15#[cfg(test)]
16use tempfile as _;
17
18mod fs;
19mod options;
20mod tree;
21mod walk;
22
23#[cfg(feature = "api")]
24pub use options::RecoveryRules;
25#[cfg(feature = "api")]
26pub use options::SkipDirPreset;
27#[cfg(feature = "api")]
28pub use options::SymlinkPolicy;
29#[cfg(feature = "api")]
30pub use options::WalkError;
31#[cfg(feature = "api")]
32pub use options::WalkOptions;
33#[cfg(feature = "api")]
34pub use tree::EntryOrigin;
35#[cfg(feature = "api")]
36pub use tree::FileEntry;
37#[cfg(feature = "api")]
38pub use tree::FileKind;
39#[cfg(feature = "api")]
40pub use tree::FileTree;
41#[cfg(feature = "api")]
42pub use walk::build_file_tree;