From 9d1b7ac334943cadf0c13998ffedc43eee788193 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 5 Oct 2020 06:48:40 -0700 Subject: [PATCH] doc: edit fs.md for minor style changes Prefer present tense and use "might" for possibility. PR-URL: https://github.com/nodejs/node/pull/35505 Reviewed-By: Daijiro Wachi --- doc/api/fs.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 58e4e96988c081..4ab97ade9a3805 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -384,7 +384,7 @@ 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. -Entries added or removed while iterating over the directory may or may not be +Entries added or removed while iterating over the directory might not be included in the iteration results. ### `dir.read(callback)` @@ -404,7 +404,7 @@ After the read is completed, the `callback` will be called with an 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 +Entries added or removed while iterating over the directory might not be included in the iteration results. ### `dir.readSync()` @@ -421,7 +421,7 @@ 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. -Entries added or removed while iterating over the directory may or may not be +Entries added or removed while iterating over the directory might not be included in the iteration results. ### `dir[Symbol.asyncIterator]()` @@ -441,7 +441,7 @@ 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. -Entries added or removed while iterating over the directory may or may not be +Entries added or removed while iterating over the directory might not be included in the iteration results. ## Class: `fs.Dirent` @@ -3508,7 +3508,7 @@ changes: * `path` {string|Buffer|URL} * `options` {Object} * `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or - `EPERM` error is encountered, Node.js will retry the operation with a linear + `EPERM` error is encountered, Node.js retries the operation with a linear backoff wait of `retryDelay` milliseconds longer on each try. This option represents the number of retries. This option is ignored if the `recursive` option is not `true`. **Default:** `0`. @@ -3559,7 +3559,7 @@ changes: * `path` {string|Buffer|URL} * `options` {Object} * `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or - `EPERM` error is encountered, Node.js will retry the operation with a linear + `EPERM` error is encountered, Node.js retries the operation with a linear backoff wait of `retryDelay` milliseconds longer on each try. This option represents the number of retries. This option is ignored if the `recursive` option is not `true`. **Default:** `0`. @@ -4411,8 +4411,8 @@ fs.write(fd, Buffer.from(data, options.encoding), callback); ``` The difference from directly calling `fs.write()` is that under some unusual -conditions, `fs.write()` may write only part of the buffer and will need to be -retried to write the remaining data, whereas `fs.writeFile()` will retry until +conditions, `fs.write()` might write only part of the buffer and need to be +retried to write the remaining data, whereas `fs.writeFile()` retries until the data is entirely written (or an error occurs). The implications of this are a common source of confusion. In @@ -5495,7 +5495,7 @@ changes: * `path` {string|Buffer|URL} * `options` {Object} * `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or - `EPERM` error is encountered, Node.js will retry the operation with a linear + `EPERM` error is encountered, Node.js retries the operation with a linear backoff wait of `retryDelay` milliseconds longer on each try. This option represents the number of retries. This option is ignored if the `recursive` option is not `true`. **Default:** `0`. @@ -5995,7 +5995,7 @@ or `O_EXCL|O_CREAT` to `CREATE_NEW`, as accepted by `CreateFileW`. The exclusive flag `'x'` (`O_EXCL` flag in open(2)) causes the operation to return an error if the path already exists. On POSIX, if the path is a symbolic link, using `O_EXCL` returns an error even if the link is to a path that does -not exist. The exclusive flag may or may not work with network file systems. +not exist. The exclusive flag might not work with network file systems. On Linux, positional writes don't work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to