fs.readdir(path[, options], callback)
Example:
"use strict";
const fs = require("fs");
const path = require("path");
// get the current file absolute path of
the let path.resolve filepath = ();
fs.readdir (filepath, "UTF-. 8", function (ERR, Files) {
IF (ERR) {
the console.log (ERR);
} {the else
the console.log (Files);
}
});
Note: The second parameter is not written, then the default is "utf-8"