1#![forbid(unsafe_code)]
2
3mod hash;
4mod language;
5mod path;
6mod walker;
7mod watcher;
8
9use camino::Utf8Path;
10use std::time::SystemTime;
11
12pub use hash::{hash_file, hash_files_parallel, Blake3Hash};
13pub use language::Language;
14pub use walker::{IgnoreWalker, PollingWalker};
15pub use watcher::{ChangeKind, ChangedPath, FileWatcher, FsWatcher, PollingWatcher};
16
17pub trait Walker {
21 fn walk(&self, root: &Utf8Path) -> impl Iterator<Item = FileEntry>;
22}
23
24#[derive(Debug, Clone)]
26pub struct FileEntry {
27 pub path: camino::Utf8PathBuf,
29 pub hash: Blake3Hash,
31 pub language: Option<Language>,
33 pub size: u64,
35 pub modified: SystemTime,
38}