walk
Every file below dir, at any depth, sorted by path.
Directories themselves are not listed (an empty one contributes nothing), and symbolic links are listed as entries but not followed, so a link to a parent directory cannot make the walk loop.
Import
Section titled “Import”Cargo feature fs (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
dir | impl AsRef<Path> | The directory to walk. |
Returns
Section titled “Returns”io::Result<Vec<PathBuf>>
Errors
Section titled “Errors”An io::Error when dir, or a directory below it, cannot be read.
