-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.
Description
- Version: 6
The docs say:
fs.R_OK - File can be read by the calling process.
However, fs.accessSync('path/to/directory', fs.R_OK)
will succeed if the path maps to a directory instead of a file. I don't know if this is the expected behavior of accessSync
but at least there should be a clarification in the documentation. Currently the documentation reads like it would succeed only for files and not for directories.
See: https://nodejs.org/api/fs.html#fs_fs_access_path_mode_callback
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.