How to use the readdirAsync function from fs

Find comprehensive JavaScript fs.readdirAsync code examples handpicked from public code repositorys.

173
174
175
176
177
178
179
180
181
182
183
}


function getNameMatchPath(rootPath, reg) {
  return Promise
    .try(() => {
      return fs.readdirAsync(rootPath);
    })
    .map((fileName) => {
      let filePath = path.join(rootPath, fileName);

fork icon0
star icon0
watch icon0