code: function walk_flat(path, iterator, callback) {
    fs.readdir(path, function (err, files) {
      if (err) {
        if ('ENOENT' === err.code) {
          callback(null);
          return;
        }
  
        callback(err);
        return;
      }
  
      async.forEach(files, function (file, next) {
        iterator(path_join(path, file), next);
      }, callback);
    });
  }
docs: walk_flat(path, iterator, callback) -> void - path (String): Path to iterate through - iterator (Function): Will be fired on each element within `path` - callback (Function): Will be fired once all files were processed  Walks through given `path` and calls `iterator(path, callback)` for each found entry (regardless to it's type) and waits for all `callback`s (passed to iterator) to be fired. After all callbacks were fired, fires `callback` (given to walk_flat itself).  NOTICE: It walks through single dimension of file system - it won't go into found sub-directories. See `walk_deep` for this puprpose.  Example:  walk_flat('/home/nodeca', function (path, callback) { if ('/home/nodeca/secrets.yml' === path) { callback(Error("There is secrets file.")); return; }  if ('/home/nodeca/xxx' === path) { callback(Error("Path contains some porno?")); return; }  callback(); }, function (err) { if (err) console.error(err); console.log('Done'); });