I have a little problem with my function. I would like to get all the files in many directories. Currently, I can get the files in the file passed in the parameters. I would like to receive the html files of each folder in the folder passed as a parameter. I will explain if I add the parameter "test", I extract the files to "test", but I would like to get "test / 1 / *. Html", "test / 2 /./. Html":
var srcpath2 = path.join('.', 'diapo', result); function getDirectories(srcpath2) { return fs.readdirSync(srcpath2).filter(function (file) { return fs.statSync(path.join(srcpath2, file)).isDirectory(); }); }
Result: [1,2,3]
thanks!
user6285277
source share