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: Clarify fs.access works on directories too. #7113

Closed
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
7 participants
@lance
Contributor

lance commented Jun 2, 2016

Checklist
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc, fs

Description of change

Fixes: #7110

This is maybe more verbose than needed, since the same information is
repeated several times. An alternative, maybe a single short sentence at
the beginning is better. E.g.

Tests a user's permissions for the file or directory specified by
path. All modes work for either files or directories. mode is...

doc: Clarify fs.access works on directories too.
Fixes: #7110

This is maybe more verbose than needed, since the same information is
repeated several times. An alternative, maybe a single short sentence at
the beginning is better. E.g.

> Tests a user's permissions for the file or directory specified by
> path. All modes work for either files or directories. `mode` is...
@cjihrig

This comment has been minimized.

Contributor

cjihrig commented Jun 2, 2016

Could you just change the first sentence to:

Tests a user's permissions for the file or directory specified by path.

As you already did. Then, for F_OK and friends, just change "File" to path.

doc,fs: Simplify fs.access documentation.
No need to be so verbose about file vs. directory. They are all just paths.
@lance

This comment has been minimized.

Contributor

lance commented Jun 2, 2016

@cjihrig simplified... Just noticed that my editor trimmed some trailing whitespace. I assume this is not a problem.

- `fs.constants.F_OK` - File is visible to the calling process. This is useful
- `fs.constants.F_OK` - Path is visible to the calling process. This is useful

This comment has been minimized.

@cjihrig

cjihrig Jun 2, 2016

Contributor

Sorry, I meant use path, formatted as code to reference the argument.

This comment has been minimized.

@lance

lance Jun 2, 2016

Contributor

I should have realized... Fixed

@cjihrig

This comment has been minimized.

Contributor

cjihrig commented Jun 2, 2016

LGTM

@mscdex mscdex added the fs label Jun 2, 2016

following constants define the possible values of `mode`. It is possible to
create a mask consisting of the bitwise OR of two or more values.
Tests a user's permissions for the file or directory specified by `path`.
`mode` is an optional integer that specifies the accessibility checks to be

This comment has been minimized.

@jasnell

jasnell Jun 2, 2016

Member

s/mode is/The mode argument is

@jasnell

This comment has been minimized.

Member

jasnell commented Jun 2, 2016

Small nit, otherwise LGTM

@lance

This comment has been minimized.

Contributor

lance commented Jun 6, 2016

@jasnell @cjihrig nits addressed

@cjihrig

This comment has been minimized.

Contributor

cjihrig commented Jun 6, 2016

Still LGTM

jasnell added a commit that referenced this pull request Jun 6, 2016

doc: clarify fs.access works on directories too.
This is maybe more verbose than needed, since the same information is
repeated several times. An alternative, maybe a single short sentence at
the beginning is better. E.g.

Fixes: #7110
PR-URL: #7113
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell

This comment has been minimized.

Member

jasnell commented Jun 6, 2016

Landed in d976d66

@evanlucas

This comment has been minimized.

Member

evanlucas commented Jun 16, 2016

This is not landing cleanly on the v6.x branch. @lance would you be interested in opening an additional PR targeting the v6.x branch?

@lance

This comment has been minimized.

Contributor

lance commented Jun 16, 2016

@evanlucas will do. A question. It's not clear to me if @jasnell's dcccbfd#diff-acabf706a8aa070a8796e3573f7e4678 is intended to land in v6.x. If so, the docs should refer to fs.constants.R_OK etc. If not, fs.R_OK. Since there is this #6534 (comment), I'm going to assume that I should leave as fs.R_OK on v6.x branch for the time being, since that should work whether @jasnell's commit lands in the branch or not.

@lance lance referenced this pull request Jun 16, 2016

Closed

doc: Fs access doc clarity v6x #7321

3 of 3 tasks complete
@lance

This comment has been minimized.

Contributor

lance commented Jun 16, 2016

@evanlucas

This comment has been minimized.

Member

evanlucas commented Jun 16, 2016

@lance yea, the linked pr is semver-minor so won't be landing until the next semver-minor bump

@gibfahn gibfahn referenced this pull request Jun 15, 2017

Closed

Auditing for 6.11.1 #230

2 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment