Synchronously tests a user's permissions for the file or directory specified
by path. The mode argument is an optional integer that specifies the
accessibility checks to be performed. mode should be either the valuefs.constants.F_OK or a mask consisting of the bitwise OR of any offs.constants.R_OK, fs.constants.W_OK, and
fs.constants.X_OK (e.g.fs.constants.W_OK | fs.constants.R_OK). Check File access constants for
possible values of mode.
If any of the accessibility checks fail, an Error will be thrown. Otherwise,
the method will return undefined.
Synchronously tests a user's permissions for the file or directory specified by
path
. Themode
argument is an optional integer that specifies the accessibility checks to be performed.mode
should be either the valuefs.constants.F_OK
or a mask consisting of the bitwise OR of any offs.constants.R_OK
,fs.constants.W_OK
, andfs.constants.X_OK
(e.g.fs.constants.W_OK | fs.constants.R_OK
). CheckFile access constants
for possible values ofmode
.If any of the accessibility checks fail, an
Error
will be thrown. Otherwise, the method will returnundefined
.