We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b02cfef commit c1fe152Copy full SHA for c1fe152
doc/api/fs.md
@@ -5434,6 +5434,24 @@ The following constants are exported by `fs.constants`.
5434
5435
Not every constant will be available on every operating system.
5436
5437
+To use more than one constant, use the bitwise OR `|` operator.
5438
+
5439
+Example:
5440
5441
+```js
5442
+const fs = require('fs');
5443
5444
+const {
5445
+ O_RDWR,
5446
+ O_CREAT,
5447
+ O_EXCL
5448
+} = fs.constants;
5449
5450
+fs.open('/path/to/my/file', O_RDWR | O_CREAT | O_EXCL, (err, fd) => {
5451
+ // ...
5452
+});
5453
+```
5454
5455
### File Access Constants
5456
5457
The following constants are meant for use with [`fs.access()`][].
0 commit comments