summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-10-10 21:49:35 +0200
committerAnna Henningsen <anna@addaleax.net>2019-10-11 23:09:41 +0200
commit7812a615ab3cf992e1f4c5b63a2e5cddcf1fedf6 (patch)
treec36939460fbc7f9fd43da6395a737bc246b198fe /doc
parent5c93aab278f6e09e345270b3a0fe49c591a0424f (diff)
downloadandroid-node-v8-7812a615ab3cf992e1f4c5b63a2e5cddcf1fedf6.tar.gz
android-node-v8-7812a615ab3cf992e1f4c5b63a2e5cddcf1fedf6.tar.bz2
android-node-v8-7812a615ab3cf992e1f4c5b63a2e5cddcf1fedf6.zip
doc: fs dir modifications may not be reflected by dir.read
PR-URL: https://github.com/nodejs/node/pull/29893 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/fs.md24
1 files changed, 16 insertions, 8 deletions
diff --git a/doc/api/fs.md b/doc/api/fs.md
index 9de4e95c48..b5efaba363 100644
--- a/doc/api/fs.md
+++ b/doc/api/fs.md
@@ -362,8 +362,10 @@ Asynchronously read the next directory entry via readdir(3) as an
After the read is completed, 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._
+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 may or may not be
+included in the iteration results.
### dir.read(callback)
<!-- YAML
@@ -380,8 +382,10 @@ Asynchronously read the next directory entry via readdir(3) as an
After the read is completed, the `callback` will be called 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._
+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 may or may not be
+included in the iteration results.
### dir.readSync()
<!-- YAML
@@ -395,8 +399,10 @@ Synchronously read the next directory entry via readdir(3) as an
If there are no more directory entries to read, `null` will be returned.
-_Directory entries returned by this function are in no particular order as
-provided by the operating system's underlying directory mechanisms._
+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 may or may not be
+included in the iteration results.
### dir\[Symbol.asyncIterator\]()
<!-- YAML
@@ -413,8 +419,10 @@ The `null` case from `dir.read()` is handled internally.
See [`fs.Dir`][] for an example.
-_Directory entries returned by this iterator are in no particular order as
-provided by the operating system's underlying directory mechanisms._
+Directory entries returned by this iterator are in no particular order as
+provided by the operating system's underlying directory mechanisms.
+Entries added or removed while iterating over the directory may or may not be
+included in the iteration results.
## Class: fs.Dirent
<!-- YAML