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: Simplify fs.access documentation.
No need to be so verbose about file vs. directory. They are all just paths.
  • Loading branch information
lance committed Jun 2, 2016
commit 8f363bf853d7bb46c2bc580725ac33c26ca6f215
15 changes: 7 additions & 8 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,13 @@ Tests a user's permissions for the file or directory specified by `path`.
performed. The 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.

- `fs.constants.F_OK` - File or directory 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` - File or directory can be read by the calling process.
- `fs.constants.W_OK` - File or directory can be written by the calling
process.
- `fs.constants.X_OK` - File or directory can be executed by the calling
process. This has no effect on Windows (will behave like `fs.constants.F_OK`).
- `fs.constants.F_OK` - Path is visible to the calling process. This is useful
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I should have realized... Fixed

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
Expand Down