I am using node 8.10.0.
fs.readdir() returns an array of filenames and child directory names, or fs.Dirents[].
I can't get that to work. Here's a simple example:
console.log(require("fs").readdirSync("/", {withFileTypes:true}));
This gives me an array of strings (e.g. ["bin", "mnt", "usr", "var", ...]), not an array of fs.Dirent objects (which is what I want).
How do I get this to work?