Using Node fs.readdir with options



I am trying to write a small CLI tool to list files in a directory and show whether each entry is a file or a directory. To do so, I want to use fs.readdir with the withFileTypes option. This is not possible currently with the provided Node api provided with bs, since it only accepts a string.

Any advice on that?


Write your own binding to the function you need.