Posts by Lucas Cristiano da Silva • 11 points
1 post
-
1
votes2
answers684
viewsQ: How to check if a directory is empty or if there is an existing file in the folder?
I would like to know how to check whether a directory (folder) is empty and whether a file already exists in it in Nodejs. Example: const fs = require("fs"); // recebeJson é a pasta que precisa ser…