lib/plugins/reload.js
function traverse(file) {
      file = master.resolve(file);
      fs.stat(file, function(err, stat){
        if (!err) {
          if (stat.isDirectory()) {
            if (~exports.ignoreDirectories.indexOf(basename(file))) return;
            fs.readdir(file, function(err, files){
              files.map(function(f){
                return file + '/' + f;
              }).forEach(traverse);
            });
          } else {
            watch(file);
          }
        }
      });
    }
function traverse(file) {
      file = master.resolve(file);
      fs.stat(file, function(err, stat){
        if (!err) {
          if (stat.isDirectory()) {
            if (~exports.ignoreDirectories.indexOf(basename(file))) return;
            fs.readdir(file, function(err, files){
              files.map(function(f){
                return file + '/' + f;
              }).forEach(traverse);
            });
          } else {
            watch(file);
          }
        }
      });
    }
function traverse ( file ) { file = master . resolve ( file ) ; fs . stat ( file , function ( err , stat ) { if ( ! err ) { if ( stat . isDirectory ( ) ) { if ( ~ exports . ignoreDirectories . indexOf ( basename ( file ) ) ) return ; fs . readdir ( file , function ( err , files ) { files . map ( function ( f ) { return file + '/' + f ; } ) . forEach ( traverse ) ; } ) ; } else { watch ( file ) ; } } } ) ; }
traverse file if it is a directory otherwise setup the watcher
traverse file if it is a directory otherwise setup the watcher