Skip to content

Commit 77251d9

Browse files
XeCyclervagg
authored andcommittedDec 5, 2015
doc: numeric flags to fs.open
This has been supperted for long but never tested nor documented. PR-URL: #3641 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent f9fe0ae commit 77251d9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎doc/api/fs.markdown

+5
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,11 @@ created. On POSIX systems, `path` is considered to exist even if it is a symlink
529529
to a non-existent file. The exclusive flag may or may not work with network file
530530
systems.
531531

532+
`flags` can also be a number as documented by open(2); commonly used constants
533+
are available from `require('constants')`. On Windows, flags are translated to
534+
their equivalent ones where applicable, e.g. `O_WRONLY` to `FILE_GENERIC_WRITE`,
535+
or `O_EXCL|O_CREAT` to `CREATE_NEW`, as accepted by CreateFileW.
536+
532537
On Linux, positional writes don't work when the file is opened in append mode.
533538
The kernel ignores the position argument and always appends the data to
534539
the end of the file.

0 commit comments

Comments
 (0)
Please sign in to comment.