Recursively get full absolute paths of all files in a given directory
$ npm install directory-files --save
const path = require('path');
const directoryFiles = require('directory-files');
const dir = path.join(__dirname, 'some/folder');
const fileNames = directoryFiles(dir);
for (const fileName of fileNames) {
console.log(fileName);
}
Type: {Function}
{String} dir
- Absolute path to a directory.
Return: Array{String}
- An array of full absolute paths.