code: function processDir(options, callback) {
    return fs.readdir(options.path, function(err, filenames) {
      if (err) {
        return callback(err);
      }
  
      if (options.ignoreDotFiles) {
        filenames = _.filter(filenames, function(filename) {
          return filename[0] !== ".";
        });
      }
  
      return async.map(filenames, function(filename, done) {
        const abspath = path.join(options.path, filename);
  
        if (options.statEach === false) {
          return done(null, {
            filename,
            path: abspath,
          });
        }
  
        stat(abspath, function(statErr, stats) {
          if (statErr) {
            return done(statErr);
          }
          return done(null, stats);
        });
      }, function(mapErr, statsMap) {
        if (mapErr) {
          return callback(err);
        }
  
        if (!options.ignoreCurDir) {
          const stats = _.cloneDeep(options.dirStats);
          stats.filename = ".";
          statsMap.push(stats);
        }
  
        if (!options.ignoreUpDir) {
          const abspath = path.join(options.path, "..");
          return stat(abspath, function(statErr, stats) {
            if (err) {
              return callback(err);
            }
            stats.filename = "..";
            statsMap.push(stats);
            return callback(null, statsMap);
          });
        }
  
        return callback(null, statsMap);
      });
    });
  }
docs: Process directory
  
  @param {Object} options
  @param {fs.Stats} options.dirStats
  @param {Function} callback