-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Closed
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -309,18 +309,18 @@ added: v1.0.0 | |
* `mode` {Integer} | ||
* `callback` {Function} | ||
|
||
Tests a user's permissions for the file specified by `path`. `mode` is an | ||
optional integer that specifies the accessibility checks to be 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. | ||
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 | ||
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 is visible to the calling process. This is useful | ||
- `fs.constants.F_OK` - Path is visible to the calling process. This is useful | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I meant use There was a problem hiding this comment. Choose a reason for hiding this commentThe 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` - File can be read by the calling process. | ||
- `fs.constants.W_OK` - File can be written by the calling process. | ||
- `fs.constants.X_OK` - File can be executed by the calling process. This has no | ||
effect on Windows (will behave like `fs.constants.F_OK`). | ||
- `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 | ||
|
@@ -341,7 +341,7 @@ added: v0.1.93 | |
* `path` {String | Buffer} | ||
* `mode` {Integer} | ||
|
||
Synchronous version of [`fs.access()`][]. This throws if any accessibility | ||
Synchronous version of [`fs.access()`][]. This throws if any accessibility | ||
checks fail, and does nothing otherwise. | ||
|
||
## fs.appendFile(file, data[, options], callback) | ||
|
@@ -503,8 +503,8 @@ the file instead of the entire file. Both `start` and `end` are inclusive and | |
start at 0. The `encoding` can be any one of those accepted by [`Buffer`][]. | ||
|
||
If `fd` is specified, `ReadStream` will ignore the `path` argument and will use | ||
the specified file descriptor. This means that no `'open'` event will be | ||
emitted. Note that `fd` should be blocking; non-blocking `fd`s should be passed | ||
the specified file descriptor. This means that no `'open'` event will be | ||
emitted. Note that `fd` should be blocking; non-blocking `fd`s should be passed | ||
to [`net.Socket`][]. | ||
|
||
If `autoClose` is false, then the file descriptor won't be closed, even if | ||
|
@@ -1802,7 +1802,7 @@ The following constants are meant for use with `fs.open()`. | |
</tr> | ||
<tr> | ||
<td><code>O_SYMLINK</code></td> | ||
<td>Flag indicating to open the symbolic link itself rather than the | ||
<td>Flag indicating to open the symbolic link itself rather than the | ||
resource it is pointing to.</td> | ||
</tr> | ||
<tr> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/
mode
is/Themode
argument is