Skip to content

Commit a844387

Browse files
committed
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 708c87d commit a844387

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

doc/api/fs.md

Lines changed: 10 additions & 10 deletions
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`
@@ -3532,7 +3532,7 @@ changes:
35323532
* `path` {string|Buffer|URL}
35333533
* `options` {Object}
35343534
* `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
3535-
`EPERM` error is encountered, Node.js will retry the operation with a linear
3535+
`EPERM` error is encountered, Node.js retries the operation with a linear
35363536
backoff wait of `retryDelay` milliseconds longer on each try. This option
35373537
represents the number of retries. This option is ignored if the `recursive`
35383538
option is not `true`. **Default:** `0`.
@@ -3583,7 +3583,7 @@ changes:
35833583
* `path` {string|Buffer|URL}
35843584
* `options` {Object}
35853585
* `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
3586-
`EPERM` error is encountered, Node.js will retry the operation with a linear
3586+
`EPERM` error is encountered, Node.js retries the operation with a linear
35873587
backoff wait of `retryDelay` milliseconds longer on each try. This option
35883588
represents the number of retries. This option is ignored if the `recursive`
35893589
option is not `true`. **Default:** `0`.
@@ -4435,8 +4435,8 @@ fs.write(fd, Buffer.from(data, options.encoding), callback);
44354435
```
44364436

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

44424442
The implications of this are a common source of confusion. In
@@ -5525,7 +5525,7 @@ changes:
55255525
* `path` {string|Buffer|URL}
55265526
* `options` {Object}
55275527
* `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
5528-
`EPERM` error is encountered, Node.js will retry the operation with a linear
5528+
`EPERM` error is encountered, Node.js retries the operation with a linear
55295529
backoff wait of `retryDelay` milliseconds longer on each try. This option
55305530
represents the number of retries. This option is ignored if the `recursive`
55315531
option is not `true`. **Default:** `0`.
@@ -6025,7 +6025,7 @@ or `O_EXCL|O_CREAT` to `CREATE_NEW`, as accepted by `CreateFileW`.
60256025
The exclusive flag `'x'` (`O_EXCL` flag in open(2)) causes the operation to
60266026
return an error if the path already exists. On POSIX, if the path is a symbolic
60276027
link, using `O_EXCL` returns an error even if the link is to a path that does
6028-
not exist. The exclusive flag may or may not work with network file systems.
6028+
not exist. The exclusive flag might not work with network file systems.
60296029

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

0 commit comments

Comments
 (0)