dir[Symbol.asyncIterator]()


异步迭代器返回的条目始终是 fs.Dirent。 来自 dir.read()null 情况是在内部处理的。

有关示例,请参见 fs.Dir

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

Asynchronously iterates over the directory via readdir(3) until all entries have been read.

Entries returned by the async iterator are always an fs.Dirent. The null case from dir.read() is handled internally.

See fs.Dir for an example.

Directory entries returned by this iterator 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.