Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: updates fs doc ( refactors file access constants ) #20558

Closed

Conversation

shobhitchittora
Copy link
Contributor

@shobhitchittora shobhitchittora commented May 6, 2018

  1. removes extra mode constants doc from fs.access and fs.accessSync.
  2. creates bookmark to the common File Access Contants block.

Closes: #20049

  • documentation is changed or added
  • commit message follows commit guidelines

1. removed extra mode constants doc
2. creates bookmark to the common File Access Contants block.

Closes: nodejs#20049
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels May 6, 2018
doc/api/fs.md Outdated
<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.

doc/api/fs.md Outdated
@@ -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.

@trivikr
Copy link
Member

trivikr commented May 6, 2018

@nodejs/fs @nodejs/documentation

doc/api/fs.md Outdated
@@ -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)?

doc/api/fs.md Outdated
@@ -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][].

doc/api/fs.md Outdated
<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
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.

@vsemozhetbyt
Copy link
Contributor

There is one more repetition in the fsPromises.access(path[, mode]) section)

1. use <code> tag
2. bottom bookmark for File Access Constants
3. typo fix

Closes: nodejs#20049
@shobhitchittora
Copy link
Contributor Author

@vsemozhetbyt done for fsPromises.access.

Copy link
Member

@trivikr trivikr left a comment

Choose a reason for hiding this comment

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

Verified the update in private branch

* `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`).
checks to be performed. Check [File Access Constants][] for possible values

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt added fast-track PRs that do not need to wait for 48 hours to land. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels May 7, 2018
@vsemozhetbyt
Copy link
Contributor

Node.js Collaborators, please, add 👍 here if you approve fast-tracking.

vsemozhetbyt pushed a commit that referenced this pull request May 8, 2018
1. removed extra mode constants doc.
2. creates bookmark to the common File Access Contants block.

PR-URL: #20558
Fixes: #20049
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@vsemozhetbyt
Copy link
Contributor

Landed in a76dfd2
Thank you!

targos pushed a commit that referenced this pull request May 12, 2018
1. removed extra mode constants doc.
2. creates bookmark to the common File Access Contants block.

PR-URL: #20558
Fixes: #20049
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@addaleax addaleax mentioned this pull request May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. fast-track PRs that do not need to wait for 48 hours to land. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants