Skip to main content

files_beneath

Function files_beneath 

Source
pub fn files_beneath(directory: &Path) -> Result<Vec<PathBuf>>
Expand description

Every file beneath directory, at any depth, sorted by path.

Directories are descended into and are not themselves returned, so what comes back is the leaves. Symlinks are followed only where the platform’s metadata already resolved them, and a cycle is not guarded against: callers point this at a mod payload or an install subtree rather than at an arbitrary root.

The counterpart to the single-level listings above, for a caller that has to see a whole tree rather than answer a name in one directory. A mod payload is the case: most ship subdirectories, and what the engine loads is the flattened set.

§Errors

Propagates the io::Error from reading any directory in the tree, naming nothing further: a caller wanting to know which one wraps this per subtree.