mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
doc: fix constants usage in fs.access example
PR-URL: https://github.com/nodejs/node/pull/39289 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
1 parent
b2c533ea1d
commit
2ef61b987d
1 file changed
+1
-1
+1
-1
@@ -1381,7 +1381,7 @@ access(file, constants.W_OK, (err) => {
|
||||
});
|
||||
|
||||
// Check if the file exists in the current directory, and if it is writable.
|
||||
access(file, constants.F_OK | fs.constants.W_OK, (err) => {
|
||||
access(file, constants.F_OK | constants.W_OK, (err) => {
|
||||
if (err) {
|
||||
console.error(
|
||||
`${file} ${err.code === 'ENOENT' ? 'does not exist' : 'is read-only'}`);
|
||||
|
||||
Reference in new issue
Block a user