We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d8a226 commit 9572701Copy full SHA for 9572701
doc/api/fs.md
@@ -5321,6 +5321,24 @@ The following constants are exported by `fs.constants`.
5321
5322
Not every constant will be available on every operating system.
5323
5324
+To use more than one constant, use the bitwise OR `|` operator.
5325
+
5326
+Example:
5327
5328
+```js
5329
+const fs = require('fs');
5330
5331
+const {
5332
+ O_RDWR,
5333
+ O_CREAT,
5334
+ O_EXCL
5335
+} = fs.constants;
5336
5337
+fs.open('/path/to/my/file', O_RDWR | O_CREAT | O_EXCL, (err, fd) => {
5338
+ // ...
5339
+});
5340
+```
5341
5342
### File Access Constants
5343
5344
The following constants are meant for use with [`fs.access()`][].
0 commit comments