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
28 changes: 8 additions & 20 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -746,18 +746,11 @@ changes:

Tests a user's permissions for the file or directory specified by `path`.
The `mode` argument is an optional integer that specifies the accessibility
checks to be performed. The following constants define the possible values of
checks to be performed. Check
[`File Access Contants`](#fs_file_access_constants) for possible values of
Copy link
Contributor

Choose a reason for hiding this comment

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

Contants -> Constants

Copy link
Contributor

@vsemozhetbyt vsemozhetbyt May 7, 2018

Choose a reason for hiding this comment

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

Also, [`File Access Contants`] -> just [File Access Contants] (as this is not a code)?

`mode`. It is possible to create a mask consisting of the bitwise OR of two or
more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`).

* `fs.constants.F_OK` - `path` is visible to the calling process. This is useful
for determining if a file exists, but says nothing about `rwx` permissions.
Default if no `mode` is specified.
* `fs.constants.R_OK` - `path` can be read by the calling process.
* `fs.constants.W_OK` - `path` can be written by the calling process.
* `fs.constants.X_OK` - `path` can be executed by the calling process. This has
no effect on Windows (will behave like `fs.constants.F_OK`).

The final argument, `callback`, is a callback function that is invoked with
a possible error argument. If any of the accessibility checks fail, the error
argument will be an `Error` object. The following examples check if
Expand Down Expand Up @@ -891,18 +884,10 @@ changes:

Synchronously tests a user's permissions for the file or directory specified by
`path`. The `mode` argument is an optional integer that specifies the
accessibility checks to be performed. The following constants define the
accessibility checks to be performed. Check [`File Access Contants`](#fs_file_access_constants) for
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt May 6, 2018

Choose a reason for hiding this comment

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

  1. Contants -> Constants
  2. This line needs to be wrapped at 80 characters. Or you can create a bottom reference and use [File Access Constants][].

possible values of `mode`. It is possible to create a mask consisting of the
bitwise OR of two or more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`).

* `fs.constants.F_OK` - `path` is visible to the calling process. This is useful
for determining if a file exists, but says nothing about `rwx` permissions.
Default if no `mode` is specified.
* `fs.constants.R_OK` - `path` can be read by the calling process.
* `fs.constants.W_OK` - `path` can be written by the calling process.
* `fs.constants.X_OK` - `path` can be executed by the calling process. This has
no effect on Windows (will behave like `fs.constants.F_OK`).

If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
the method will return `undefined`.

Expand Down Expand Up @@ -4329,7 +4314,9 @@ The following constants are meant for use with [`fs.access()`][].
</tr>
<tr>
<td><code>F_OK</code></td>
<td>Flag indicating that the file is visible to the calling process.</td>
<td>Flag indicating that the file is visible to the calling process.
This is useful for determining if a file exists, but says nothing
about rwx permissions. Default if no mode is specified.</td>
Copy link
Member

Choose a reason for hiding this comment

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

rwx -> rwx
mode -> mode

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @trivikr. I don't think markdown highlight `` will work inside HTML tags. Refer - https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#inline-html

Copy link
Contributor

Choose a reason for hiding this comment

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

You can use <code></code> here and below.

</tr>
<tr>
<td><code>R_OK</code></td>
Expand All @@ -4343,7 +4330,8 @@ The following constants are meant for use with [`fs.access()`][].
<tr>
<td><code>X_OK</code></td>
<td>Flag indicating that the file can be executed by the calling
process.</td>
process. This has no effect on Windows
(will behave like fs.constants.F_OK).</td>
Copy link
Member

Choose a reason for hiding this comment

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

fs.constants.F_OK -> fs.constants.F_OK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above.

</tr>
</table>

Expand Down