@@ -746,17 +746,9 @@ changes:
746
746
747
747
Tests a user's permissions for the file or directory specified by ` path ` .
748
748
The ` mode ` argument is an optional integer that specifies the accessibility
749
- checks to be performed. The following constants define the possible values of
750
- ` mode ` . It is possible to create a mask consisting of the bitwise OR of two or
751
- more values (e.g. ` fs.constants.W_OK | fs.constants.R_OK ` ).
752
-
753
- * ` fs.constants.F_OK ` - ` path ` is visible to the calling process. This is useful
754
- for determining if a file exists, but says nothing about ` rwx ` permissions.
755
- Default if no ` mode ` is specified.
756
- * ` fs.constants.R_OK ` - ` path ` can be read by the calling process.
757
- * ` fs.constants.W_OK ` - ` path ` can be written by the calling process.
758
- * ` fs.constants.X_OK ` - ` path ` can be executed by the calling process. This has
759
- no effect on Windows (will behave like ` fs.constants.F_OK ` ).
749
+ checks to be performed. Check [ File Access Constants] [ ] for possible values
750
+ of ` mode ` . It is possible to create a mask consisting of the bitwise OR of
751
+ two or more values (e.g. ` fs.constants.W_OK | fs.constants.R_OK ` ).
760
752
761
753
The final argument, ` callback ` , is a callback function that is invoked with
762
754
a possible error argument. If any of the accessibility checks fail, the error
@@ -889,19 +881,12 @@ changes:
889
881
* ` path ` {string|Buffer|URL}
890
882
* ` mode ` {integer} ** Default:** ` fs.constants.F_OK `
891
883
892
- Synchronously tests a user's permissions for the file or directory specified by
893
- ` path ` . The ` mode ` argument is an optional integer that specifies the
894
- accessibility checks to be performed. The following constants define the
895
- possible values of ` mode ` . It is possible to create a mask consisting of the
896
- bitwise OR of two or more values (e.g. ` fs.constants.W_OK | fs.constants.R_OK ` ).
897
-
898
- * ` fs.constants.F_OK ` - ` path ` is visible to the calling process. This is useful
899
- for determining if a file exists, but says nothing about ` rwx ` permissions.
900
- Default if no ` mode ` is specified.
901
- * ` fs.constants.R_OK ` - ` path ` can be read by the calling process.
902
- * ` fs.constants.W_OK ` - ` path ` can be written by the calling process.
903
- * ` fs.constants.X_OK ` - ` path ` can be executed by the calling process. This has
904
- no effect on Windows (will behave like ` fs.constants.F_OK ` ).
884
+ Synchronously tests a user's permissions for the file or directory specified
885
+ by ` path ` . The ` mode ` argument is an optional integer that specifies the
886
+ accessibility checks to be performed. Check [ File Access Constants] [ ] for
887
+ possible values of ` mode ` . It is possible to create a mask consisting of
888
+ the bitwise OR of two or more values
889
+ (e.g. ` fs.constants.W_OK | fs.constants.R_OK ` ).
905
890
906
891
If any of the accessibility checks fail, an ` Error ` will be thrown. Otherwise,
907
892
the method will return ` undefined ` .
@@ -3679,17 +3664,9 @@ added: v10.0.0
3679
3664
3680
3665
Tests a user's permissions for the file or directory specified by ` path ` .
3681
3666
The ` mode ` argument is an optional integer that specifies the accessibility
3682
- checks to be performed. The following constants define the possible values of
3683
- ` mode ` . It is possible to create a mask consisting of the bitwise OR of two or
3684
- more values (e.g. ` fs.constants.W_OK | fs.constants.R_OK ` ).
3685
-
3686
- * ` fs.constants.F_OK ` - ` path ` is visible to the calling process. This is useful
3687
- for determining if a file exists, but says nothing about ` rwx ` permissions.
3688
- Default if no ` mode ` is specified.
3689
- * ` fs.constants.R_OK ` - ` path ` can be read by the calling process.
3690
- * ` fs.constants.W_OK ` - ` path ` can be written by the calling process.
3691
- * ` fs.constants.X_OK ` - ` path ` can be executed by the calling process. This has
3692
- no effect on Windows (will behave like ` fs.constants.F_OK ` ).
3667
+ checks to be performed. Check [ File Access Constants] [ ] for possible values
3668
+ of ` mode ` . It is possible to create a mask consisting of the bitwise OR of
3669
+ two or more values (e.g. ` fs.constants.W_OK | fs.constants.R_OK ` ).
3693
3670
3694
3671
If the accessibility check is successful, the ` Promise ` is resolved with no
3695
3672
value. If any of the accessibility checks fail, the ` Promise ` is rejected
@@ -4329,7 +4306,9 @@ The following constants are meant for use with [`fs.access()`][].
4329
4306
</tr >
4330
4307
<tr >
4331
4308
<td><code>F_OK</code></td>
4332
- <td>Flag indicating that the file is visible to the calling process.</td>
4309
+ <td>Flag indicating that the file is visible to the calling process.
4310
+ This is useful for determining if a file exists, but says nothing
4311
+ about <code>rwx</code> permissions. Default if no mode is specified.</td>
4333
4312
</tr >
4334
4313
<tr >
4335
4314
<td><code>R_OK</code></td>
@@ -4343,7 +4322,8 @@ The following constants are meant for use with [`fs.access()`][].
4343
4322
<tr >
4344
4323
<td><code>X_OK</code></td>
4345
4324
<td>Flag indicating that the file can be executed by the calling
4346
- process.</td>
4325
+ process. This has no effect on Windows
4326
+ (will behave like <code>fs.constants.F_OK</code>).</td>
4347
4327
</tr >
4348
4328
</table >
4349
4329
@@ -4706,3 +4686,4 @@ the file contents.
4706
4686
[ Naming Files, Paths, and Namespaces ] : https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
4707
4687
[ MSDN-Using-Streams ] : https://msdn.microsoft.com/en-us/library/windows/desktop/bb540537.aspx
4708
4688
[ support of file system `flags` ] : #fs_file_system_flags
4689
+ [ File Access Constants ] : #fs_file_access_constants
0 commit comments