Method description:
Synchronized version of fs.readdir() .
Themethod will return an array object containing "all file names in the specified directory".
Grammar:
Since this method belongs to the fs module, the fs module needs to be introduced before use (var fs= require(“fs”) )
Receive parameters:
path Directory path
Example:
Source code: