Skip to content

Commit 7a92c3c

Browse files
jasnelltargos
authored andcommitted
doc: clarify that fs.Dir async iterator closes automatically
Signed-off-by: James M Snell <[email protected]> Fixes: #35148 PR-URL: #38438 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent b819848 commit 7a92c3c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/api/fs.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,9 @@ try {
905905
}
906906
```
907907
908+
When using the async iterator, the {fs.Dir} object will be automatically
909+
closed after the iterator exits.
910+
908911
### `fsPromises.readdir(path[, options])`
909912
<!-- YAML
910913
added: v10.0.0
@@ -5076,6 +5079,9 @@ try {
50765079
}
50775080
```
50785081
5082+
When using the async iterator, the {fs.Dir} object will be automatically
5083+
closed after the iterator exits.
5084+
50795085
#### `dir.close()`
50805086
<!-- YAML
50815087
added: v12.12.0

0 commit comments

Comments
 (0)