how to get all files in a directory node js code example
Example 1: node get all files in folder
fs.readdir('./', (err, files) => {
files.forEach(file => {
// console.log(file);
})});
Example 2: how to read all files in a folder in node js
fs.readdir('./', (err, files) => {
files.forEach(file => {
// console.log(file);
}});