Assume I have an array with paths to multiple files. I would like to delete these files asynchronously.
var files = ['file1.txt', 'file2.txt']; fs.unlink(..., callback()) I came across with this solution Delete several files in node.js but I think it violates node.js practices (asynchronous function inside a for loop). Is there any other, better solution for this?
fs.unlinkSync) is desired, as it speeds up your script by processing them in parallel.