mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -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
eacee0ab17
commit
146f733f43
1 file changed
+1
-1
+1
-1
@@ -1393,7 +1393,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