dir.readSync()
- 返回:<fs.Dirent> | <null>
以同步方式将下一个目录项读取为 <fs.Dirent>。更多详情请参见 POSIX readdir(3) 文档。
【Synchronously read the next directory entry as an <fs.Dirent>. See the
POSIX readdir(3) documentation for more detail.】
如果没有更多的目录条目可读取,将返回 null。
【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 might not be included in the iteration results.】