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 Sep 4, 2021
1 parent b819848 commit 7a92c3c
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 @@ -905,6 +905,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 @@ -5076,6 +5079,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 7a92c3c

Please sign in to comment.