fs.opendirSync(path[, options])
同步打开一个目录。参见 opendir(3)。
【Synchronously open a directory. See opendir(3).】
创建一个 <fs.Dir>,其中包含用于从目录中读取和清理的所有后续功能。
【Creates an <fs.Dir>, which contains all further functions for reading from and cleaning up the directory.】
encoding 选项用于设置在打开目录以及后续读取操作时 path 的编码。
【The encoding option sets the encoding for the path while opening the
directory and subsequent read operations.】