wiztree_metafile/
lib.rs

1// File Analyzer Library
2// A tool for analyzing directory structures and file information
3//
4//! # File Analyzer
5//!
6//! A Rust library and CLI tool for analyzing directory structures and file information.
7//! Designed to handle large file systems (100,000+ files) efficiently with configurable
8//! traversal strategies, multi-threading support, and memory-efficient streaming.
9//!
10//! ## Features
11//!
12//! - **Configurable depth limits**: Control how deep to traverse directory structures
13//! - **File count limits**: Prevent excessive processing time on large file systems
14//! - **Multiple traversal strategies**: Choose between depth-first and breadth-first
15//! - **Size filtering**: Focus on files above a minimum size threshold
16//! - **Multi-threading**: Leverage multiple CPU cores for faster processing
17//! - **Symbolic link handling**: Correctly handle symlinks and prevent circular references
18//! - **Flexible output**: Output to stdout (text) or file (JSON)
19//!
20//! ## Example
21//!
22//! ```no_run
23//! use file_analyzer::{AnalyzerConfig, FileAnalyzer, TraversalStrategy};
24//! use std::path::PathBuf;
25//!
26//! let mut config = AnalyzerConfig::new(PathBuf::from("."));
27//! config.max_depth = Some(3);
28//! config.min_file_size = 1024; // Only files >= 1KB
29//! config.traversal_strategy = TraversalStrategy::DepthFirst;
30//!
31//! let analyzer = FileAnalyzer::new(config);
32//! match analyzer.analyze() {
33//!     Ok(result) => {
34//!         println!("Total size: {} bytes", result.total_size);
35//!         println!("File count: {}", result.file_count);
36//!     }
37//!     Err(e) => eprintln!("Error: {}", e),
38//! }
39//! ```
40
41pub mod analyzer;
42pub mod collector;
43pub mod config;
44pub mod error;
45pub mod link_handler;
46pub mod output;
47pub mod processor;
48pub mod traversal;
49pub mod walker;
50
51// Re-export main types for convenience
52pub use analyzer::{AnalysisResult, FileAnalyzer, FileEntry};
53pub use config::{AnalyzerConfig, TraversalStrategy};
54pub use error::AnalyzerError;
55pub use output::OutputFormat;