A recursive file walker for node.js
npm install pedestrian --save
Synchronously or asynchronously walk a file tree and receive an array of files back.
Walk a file tree asynchronously. This function returns a promise.
const pedestrian = ;pedestrian;
Or to get only particular files, pass one or more glob patterns as the second argument.
Negative globs are also supported.
The api for
walkSync is the same as for
walk, but instead of returning a promise, it returns the array of files.
let files = pedestrian;
Both the sync and async versions work with either absolute or relatives paths. Relative paths should be relative to the caller, rather than the current working directory. The files that
pedestrian returns will always be absolute paths, however.
See minimatch for more on the kinds of patterns you can use.
Please see the contribution guidelines.