Skip to content

Commit

Permalink
doc: clarify that fs.Dir async iterator closes automatically
Browse files Browse the repository at this point in the history
Signed-off-by: James M Snell <jasnell@gmail.com>
Fixes: #35148

PR-URL: #38438
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
jasnell authored and targos committed Apr 29, 2021
1 parent 195f679 commit 1eae4af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,9 @@ try {
}
```
When using the async iterator, the {fs.Dir} object will be automatically
closed after the iterator exits.
### `fsPromises.readdir(path[, options])`
<!-- YAML
added: v10.0.0
Expand Down Expand Up @@ -5119,6 +5122,9 @@ try {
}
```
When using the async iterator, the {fs.Dir} object will be automatically
closed after the iterator exits.
#### `dir.close()`
<!-- YAML
added: v12.12.0
Expand Down

0 comments on commit 1eae4af

Please sign in to comment.