A simple, performant file system walker to provided fine-grained control over directories and files to walk. Supports Node 0.10 and above.
-Note: This API is very robust for a variety of use cases as it passes the chokidar and readdirp test suites plus it does not accumulate results in memory.
+A simple, performant file system walker to provided fine-grained control over directories and files to walk. Supports Node 0.10 and above.
+Note: This API is very robust for a variety of use cases as it passes the chokidar and readdirp test suites plus it does not accumulate results in memory.
Entries are of the format:
Promise Filter Function
await walk(rootPath, async (entry) => { /* do something */ return true or false });
+
Callback Filter Function
walk(rootPath, function(entry, callback) { /* do something */ callback(null, true or false); }, {callbacks: true}, done);
+
Synchronous Filter Function
walk(rootPath, function(entry) { /* do something */ return true or false }, done);
+
Options:
function(entry, callback)
. (default: false)