From f17a9680ff5622be083a90b1ef81b8123411952d Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 27 Apr 2021 08:32:17 -0700 Subject: [PATCH 1/2] doc: clarify that fs.Dir async iterator closes automatically Signed-off-by: James M Snell Fixes: https://github.com/nodejs/node/issues/35148 --- doc/api/fs.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 179cabbfff5113..2c91f132ddbef0 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -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])`