Skip to main content

Module module_walk

Module module_walk 

Source
Expand description

Safe module-content tree walk shared by hashing, verification, resource-limit checking, and materialization.

One traversal implementation enforces all module-content rules. The canonical module root is carried through all recursion so containment checks are never relative to the current directory. Directory symlinks are rejected to prevent cycles. File symlinks are allowed when they resolve inside the module root and do not target non-module content.

Structs§

TreeStats
Statistics collected during a tree walk.

Enums§

ModuleWalkError
An error encountered while walking a module tree.
WalkError
The error type for walk_module_tree. Wraps both walk-layer errors and visitor errors.

Functions§

walk_module_tree
Walks every regular file under root, enforcing containment and metadata exclusion. Calls visitor for each file with its path and size. Returns aggregate statistics.