I have a folder that contain some text documents,
I want to create an array that contain the names of the text documents.
the result must be like this:
array=[firstfile.txt],[secondfile.txt],[thirdfile.txt],ecc.
i know that i have to do something like this:
fs.readFile(foldername, function (err, content) {
var array = content.toString().split("...");
}
But i don't know what should I write in the .split().
Some idea? thanks.
fs.readdir().