Is there a way to iterate the files in the paths.dirs returned by node-dir? It also returns paths.files but they are not necessarily in the same subdir
I want to avoid rereading dirs like:
...
root_dir.subdirs(__dirname, function(err, subdirs) { // read root_dir
if (err) throw err;
map(subdirs, function(dir){ // for each dir in subdirs
fs.readdir( dir, function( err, files ) { // read dir
if(err) console.log(err)
files.forEach( function( file, index ) {
...
Is there a way to iterate the files in the paths.dirs returned by node-dir? It also returns paths.files but they are not necessarily in the same subdir
I want to avoid rereading dirs like: