method fs.walk
All descendants, sorted by relative path; symbolic links are listed, not followed.
Example:
use std.io { File, fs }
fn main() io {
let dir = fs.tempDir()!
fs.createDirAll("{dir}/x/y")!
File.writeText("{dir}/x/y/f", "")!
print("{fs.walk(dir)!.len()}")
fs.removeAll(dir)!
}Output
3
pub(api) static fn walk(path: str) -> List<DirEntry> | IoError ioSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
path | str |
Returns
Errors
IoError@error
Effects
io
Defined in: std/io/io.oxl:653