Closed
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