each of those child directory has one file. now based on user provided data first server is reading the parent directory using fs.readdir(parent dir). after this i want to read each file path inside those child directory and put the path in each row in a html table. for this i am using for loop with the result of fs.readdir(parent dir). but is there any way to read each file path in child directory asynchronously using fs.readdir inside the for loop? i am thinking of something like promise.all but is it feasable? or is there any other way?
I wrote a callback version of this once
Обсуждают сегодня