node-file-walker

A Simple file/directory traversal (recusive lookup)

  • files - an array of files/directories in current directory e.g. ['dummy', 'test.js']
  • dir - directory name e.g. './test'
  • level - Current directory level starting from 0
var walk = require('file-walker');
 
walk('./directory', function(filesdirlevel) {
    // your logic 
});