Expand description
Directory traversal with filtering for tree hashing, archive packing, and mtime computation.
Substrate defines the traversal logic and filtering rules; callers provide I/O
via the DirReader trait. This keeps substrate zero-I/O and WASM-compatible
while ensuring consistent filtering everywhere.
Structs§
- DirEntry
- A single entry returned by
DirReader::read_dir.
Traits§
- DirReader
- Filesystem abstraction so substrate can drive traversal without doing I/O itself.
Functions§
- flatten_
entries - Flatten a recursive
TreeEntrytree into a flat list of(path, content, executable). - max_
mtime - Walk a directory and return the maximum file modification time (epoch ms).
- should_
exclude - Check whether a filename should be excluded (exact name match).
- walk_
dir - Walk a directory tree and produce
TreeEntryvalues.