dir.read()
- 返回: <Promise> 包含 <fs.Dirent> | <null>
通过 readdir(3)
异步地读取下一个目录条目作为 <fs.Dirent>。
返回 promise,其将使用 <fs.Dirent> 或 null
(如果读取不到更多的目录条目)解决。
此函数返回的目录条目没有操作系统底层目录机制提供的特定顺序。 迭代目录时添加或删除的条目可能不包括在迭代结果中。
- Returns: <Promise> containing <fs.Dirent> | <null>
Asynchronously read the next directory entry via readdir(3)
as an
<fs.Dirent>.
A promise is returned that will be resolved with an <fs.Dirent>, or null
if there are no more directory entries to read.
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.