Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: fs sync methods links now to async methods
  • Loading branch information
iwko authored and Trott committed Jul 9, 2018
commit 1dc060af4d9da83051aa6c774cecff0376508989
24 changes: 12 additions & 12 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ changes:
Synchronously changes the permissions of a file. Returns `undefined`.
This is the synchronous version of [`fs.chmod()`][].
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iwko I believe @davisjam and @Trott and I meant that sentence like

 This is the synchronous version of [`fs.chmod()`][].

Should be removed after sentences like

For detailed information, see the documentation of the asynchronous version of
this API: [`fs.chmod()`][].

are added to avoid duplication?

Copy link
Copy Markdown
Contributor Author

@iwko iwko Jun 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little confused now. So documentation for fs.chmod() should look like this?

Synchronously changes the permissions of a file. Returns undefined. For detailed information, see the documentation of the asynchronous version of this API: [fs.chmod()][]. See also: chmod(2).
?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iwko Yes, that's my understanding

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


For detailed information, see the documentation of [`fs.chmod()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.chmod()`][].

See also: chmod(2).

Expand Down Expand Up @@ -1572,7 +1572,7 @@ changes:
Synchronous version of [`fs.exists()`][].
Returns `true` if the path exists, `false` otherwise.

For detailed information, see the documentation of [`fs.exists()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.exists()`][].

`fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback`
parameter to `fs.exists()` accepts parameters that are inconsistent with other
Expand Down Expand Up @@ -1827,7 +1827,7 @@ added: v0.8.6

Synchronous ftruncate(2). Returns `undefined`.

For detailed information, see the documentation of [`fs.ftruncate()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.ftruncate()`][].

## fs.futimes(fd, atime, mtime, callback)
<!-- YAML
Expand Down Expand Up @@ -2180,7 +2180,7 @@ added: v5.10.0
The synchronous version of [`fs.mkdtemp()`][]. Returns the created
folder path.

For detailed information, see the documentation of [`fs.mkdtemp()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.mkdtemp()`][].

The optional `options` argument can be a string specifying an encoding, or an
object with an `encoding` property specifying the character encoding to use.
Expand Down Expand Up @@ -2239,7 +2239,7 @@ changes:
Synchronous version of [`fs.open()`][]. Returns an integer representing the file
descriptor.

For detailed information, see the documentation of [`fs.open()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.open()`][].

## fs.read(fd, buffer, offset, length, position, callback)
<!-- YAML
Expand Down Expand Up @@ -2439,7 +2439,7 @@ changes:

Synchronous version of [`fs.readFile()`][]. Returns the contents of the `path`.

For detailed information, see the documentation of [`fs.readFile()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.readFile()`][].

If the `encoding` option is specified then this function returns a
string. Otherwise it returns a buffer.
Expand Down Expand Up @@ -2529,7 +2529,7 @@ changes:

Synchronous version of [`fs.read()`][]. Returns the number of `bytesRead`.

For detailed information, see the documentation of [`fs.read()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.read()`][].

## fs.realpath(path[, options], callback)
<!-- YAML
Expand Down Expand Up @@ -2646,7 +2646,7 @@ changes:

Synchronous version of [`fs.realpath()`][]. Returns the resolved pathname.

For detailed information, see the documentation of [`fs.realpath()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.realpath()`][].

## fs.realpathSync.native(path[, options])
<!-- YAML
Expand Down Expand Up @@ -2884,7 +2884,7 @@ changes:

Synchronous symlink(2). Returns `undefined`.

For detailed information, see the documentation of [`fs.symlink()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.symlink()`][].

## fs.truncate(path[, len], callback)
<!-- YAML
Expand Down Expand Up @@ -3062,7 +3062,7 @@ changes:

Synchronous version of [`fs.utimes()`][]. Returns `undefined`.

For detailed information, see the documentation of [`fs.utimes()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.utimes()`][].

## fs.watch(filename[, options][, listener])
<!-- YAML
Expand Down Expand Up @@ -3415,7 +3415,7 @@ changes:

The synchronous version of [`fs.writeFile()`][]. Returns `undefined`.

For detailed information, see the documentation of [`fs.writeFile()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.writeFile()`][].

## fs.writeSync(fd, buffer[, offset[, length[, position]]])
<!-- YAML
Expand Down Expand Up @@ -3453,7 +3453,7 @@ changes:

Synchronous versions of [`fs.write()`][]. Returns the number of bytes written.

For detailed information, see the documentation of [`fs.write()`][].
For detailed information, see the documentation of the asynchronous version of this API: [`fs.write()`][].

## fs Promises API

Expand Down