Skip to content

Commit 9d1b7ac

Browse files
TrottMylesBorins
authored andcommitted
doc: edit fs.md for minor style changes
Prefer present tense and use "might" for possibility. PR-URL: #35505 Reviewed-By: Daijiro Wachi <[email protected]>
1 parent c1bb364 commit 9d1b7ac

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

doc/api/fs.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ an [`fs.Dirent`][], or `null` if there are no more directory entries to read.
384384

385385
Directory entries returned by this function are in no particular order as
386386
provided by the operating system's underlying directory mechanisms.
387-
Entries added or removed while iterating over the directory may or may not be
387+
Entries added or removed while iterating over the directory might not be
388388
included in the iteration results.
389389

390390
### `dir.read(callback)`
@@ -404,7 +404,7 @@ After the read is completed, the `callback` will be called with an
404404

405405
Directory entries returned by this function are in no particular order as
406406
provided by the operating system's underlying directory mechanisms.
407-
Entries added or removed while iterating over the directory may or may not be
407+
Entries added or removed while iterating over the directory might not be
408408
included in the iteration results.
409409

410410
### `dir.readSync()`
@@ -421,7 +421,7 @@ If there are no more directory entries to read, `null` will be returned.
421421

422422
Directory entries returned by this function are in no particular order as
423423
provided by the operating system's underlying directory mechanisms.
424-
Entries added or removed while iterating over the directory may or may not be
424+
Entries added or removed while iterating over the directory might not be
425425
included in the iteration results.
426426

427427
### `dir[Symbol.asyncIterator]()`
@@ -441,7 +441,7 @@ See [`fs.Dir`][] for an example.
441441

442442
Directory entries returned by this iterator are in no particular order as
443443
provided by the operating system's underlying directory mechanisms.
444-
Entries added or removed while iterating over the directory may or may not be
444+
Entries added or removed while iterating over the directory might not be
445445
included in the iteration results.
446446

447447
## Class: `fs.Dirent`
@@ -3508,7 +3508,7 @@ changes:
35083508
* `path` {string|Buffer|URL}
35093509
* `options` {Object}
35103510
* `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
3511-
`EPERM` error is encountered, Node.js will retry the operation with a linear
3511+
`EPERM` error is encountered, Node.js retries the operation with a linear
35123512
backoff wait of `retryDelay` milliseconds longer on each try. This option
35133513
represents the number of retries. This option is ignored if the `recursive`
35143514
option is not `true`. **Default:** `0`.
@@ -3559,7 +3559,7 @@ changes:
35593559
* `path` {string|Buffer|URL}
35603560
* `options` {Object}
35613561
* `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
3562-
`EPERM` error is encountered, Node.js will retry the operation with a linear
3562+
`EPERM` error is encountered, Node.js retries the operation with a linear
35633563
backoff wait of `retryDelay` milliseconds longer on each try. This option
35643564
represents the number of retries. This option is ignored if the `recursive`
35653565
option is not `true`. **Default:** `0`.
@@ -4411,8 +4411,8 @@ fs.write(fd, Buffer.from(data, options.encoding), callback);
44114411
```
44124412

44134413
The difference from directly calling `fs.write()` is that under some unusual
4414-
conditions, `fs.write()` may write only part of the buffer and will need to be
4415-
retried to write the remaining data, whereas `fs.writeFile()` will retry until
4414+
conditions, `fs.write()` might write only part of the buffer and need to be
4415+
retried to write the remaining data, whereas `fs.writeFile()` retries until
44164416
the data is entirely written (or an error occurs).
44174417

44184418
The implications of this are a common source of confusion. In
@@ -5495,7 +5495,7 @@ changes:
54955495
* `path` {string|Buffer|URL}
54965496
* `options` {Object}
54975497
* `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
5498-
`EPERM` error is encountered, Node.js will retry the operation with a linear
5498+
`EPERM` error is encountered, Node.js retries the operation with a linear
54995499
backoff wait of `retryDelay` milliseconds longer on each try. This option
55005500
represents the number of retries. This option is ignored if the `recursive`
55015501
option is not `true`. **Default:** `0`.
@@ -5995,7 +5995,7 @@ or `O_EXCL|O_CREAT` to `CREATE_NEW`, as accepted by `CreateFileW`.
59955995
The exclusive flag `'x'` (`O_EXCL` flag in open(2)) causes the operation to
59965996
return an error if the path already exists. On POSIX, if the path is a symbolic
59975997
link, using `O_EXCL` returns an error even if the link is to a path that does
5998-
not exist. The exclusive flag may or may not work with network file systems.
5998+
not exist. The exclusive flag might not work with network file systems.
59995999

60006000
On Linux, positional writes don't work when the file is opened in append mode.
60016001
The kernel ignores the position argument and always appends the data to

0 commit comments

Comments
 (0)