directory walk
Visiting every file and folder below a starting directory, as a build tool or file indexer does.
In more detail
Here "directory traversal" means listing folders; in security the same phrase names an attack that escapes a folder with ../ paths. Walking a large tree can mean thousands of system calls, so tools try to get each entry's type while listing it.
Related terms
- fs.readdir() — The Node.js function that lists the entries of a directory, optionally with their types and optionally including every subdirectory.
- directory — A folder: a named container in a filesystem that holds files and other directories.
Taught in
- Directory Traversal: Recursive Readdir & fs.watch — Node.js Internals & Backend Services