This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Recurse through a directory and populate an array with all the file paths beneath | |
* @param {string} path The path to start searching | |
* @param {array} allFiles Modified to contain all the file paths | |
*/ | |
function readdirSyncRecursive(path, allFiles) { | |
var stats = fs.statSync(path); | |
if (stats.isFile()) { | |
// base case | |
allFiles.push(path); |
NewerOlder