Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add fs multiple constants example
  • Loading branch information
Ethan-Arrowood authored May 7, 2020
commit 1ac99b8c930ef5274f4465eb6be1f79f2f7a86ef
14 changes: 14 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5367,6 +5367,20 @@ The following constants are exported by `fs.constants`.

Not every constant will be available on every operating system.

To use more than one constant, use the bitwise OR `|` operator.

Example:

```js
const fs = require('fs')

const flags = fs.constants.O_RDWR | fs.constants.O_CREAT | fs.constants.O_EXCL

fs.open('<file>', flags, (err, fd) => {
// ...
})
```

### File Access Constants

The following constants are meant for use with [`fs.access()`][].
Expand Down