Skip to content

Commit

Permalink
fixup! doc: use serial comma in fs docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tniessen committed May 15, 2022
1 parent 4d5bbc7 commit 1238886
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ changes:
* Returns: {Promise}
Asynchronously writes data to a file, replacing the file if it already exists.
`data` can be a string, a buffer, an {AsyncIterable} or {Iterable} object.
`data` can be a string, a buffer, an {AsyncIterable}, or an {Iterable} object.
The promise is resolved with no arguments upon success.
If `options` is a string, then it specifies the `encoding`.
Expand Down Expand Up @@ -1684,7 +1684,7 @@ access(file, constants.R_OK | constants.W_OK, (err) => {
```
Do not use `fs.access()` to check for the accessibility of a file before calling
`fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing
`fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing
so introduces a race condition, since other processes may change the file's
state between the two calls. Instead, user code should open/read/write the
file directly and handle the error raised if the file is not accessible.
Expand Down Expand Up @@ -2409,7 +2409,7 @@ has only one boolean parameter. This is one reason `fs.access()` is recommended
instead of `fs.exists()`.
Using `fs.exists()` to check for the existence of a file before calling
`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing
`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing
so introduces a race condition, since other processes may change the file's
state between the two calls. Instead, user code should open/read/write the
file directly and handle the error raised if the file does not exist.
Expand Down Expand Up @@ -3873,7 +3873,7 @@ Asynchronous stat(2). The callback gets two arguments `(err, stats)` where
In case of an error, the `err.code` will be one of [Common System Errors][].

Using `fs.stat()` to check for the existence of a file before calling
`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended.
`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended.
Instead, user code should open/read/write the file directly and handle the
error raised if the file is not available.

Expand Down Expand Up @@ -6363,7 +6363,7 @@ changes:
A {fs.Stats} object provides information about a file.
Objects returned from [`fs.stat()`][], [`fs.lstat()`][] and [`fs.fstat()`][] and
Objects returned from [`fs.stat()`][], [`fs.lstat()`][], [`fs.fstat()`][], and
their synchronous counterparts are of this type.
If `bigint` in the `options` passed to those methods is true, the numeric values
will be `bigint` instead of `number`, and the object will contain additional
Expand Down Expand Up @@ -7521,7 +7521,7 @@ fs.open('<directory>', 'a+', (err, fd) => {
```
On Windows, opening an existing hidden file using the `'w'` flag (either
through `fs.open()` or `fs.writeFile()` or `fsPromises.open()`) will fail with
through `fs.open()`, `fs.writeFile()`, or `fsPromises.open()`) will fail with
`EPERM`. Existing hidden files can be opened for writing with the `'r+'` flag.
A call to `fs.ftruncate()` or `filehandle.truncate()` can be used to reset
Expand Down

0 comments on commit 1238886

Please sign in to comment.