Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 77251d9

Browse filesBrowse files
XeCyclervagg
authored andcommitted
doc: numeric flags to fs.open
This has been supperted for long but never tested nor documented. PR-URL: #3641 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent f9fe0ae commit 77251d9
Copy full SHA for 77251d9

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.markdown‎

Copy file name to clipboardExpand all lines: doc/api/fs.markdown
+5Lines changed: 5 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.