function getAllFiles()

in src/Runner.js [136:160]


function getAllFiles(paths, filter) {
  return Promise.all(
    paths.map(file => new Promise(resolve => {
      fs.lstat(file, (err, stat) => {
        if (err) {
          process.stderr.write('Skipping path ' + file + ' which does not exist. \n');
          resolve([]);
          return;
        }

        if (stat.isDirectory()) {
          dirFiles(
            file,
            list => resolve(list.filter(filter))
          );
        } else if (ignores.shouldIgnore(file)) {
          // ignoring the file
          resolve([]);
        } else {
          resolve([file]);
        }
      })
    }))
  ).then(concatAll);
}