dir[Symbol.asyncIterator]()


异步地遍历目录,直到读取了所有条目。 有关更多详细信息,请参考 POSIX readdir(3) 文档。

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

有关示例,请参见 <fs.Dir>

此迭代器返回的目录条目没有操作系统底层目录机制提供的特定顺序。 迭代目录时添加或删除的条目可能不包括在迭代结果中。

Asynchronously iterates over the directory until all entries have been read. Refer to the POSIX readdir(3) documentation for more detail.

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 might not be included in the iteration results.