Answers for "node.js reading directory"

3

read directory in node js

const testFolder = './tests/';
const fs = require('fs');

fs.readdir(testFolder, (err, files) => {
  files.forEach(file => {
    console.log(file);
  });
});
Posted by: Guest on April-09-2021
0

open folder node js

require('child_process').exec('start "" "c:\\test"');
Posted by: Guest on March-28-2020

Code answers related to "node.js reading directory"

Code answers related to "Javascript"

Browse Popular Code Answers by Language