dir.readSync()


如果读取不到更多的目录条目,则将返回 null

此函数返回的目录条目没有操作系统底层目录机制提供的特定顺序。

Synchronously read the next directory entry via readdir(3) as an fs.Dirent.

If there are no more directory entries to read, null will be returned.

Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms. Entries added or removed while iterating over the directory may or may not be included in the iteration results.