Browse Source

doc: numeric flags to fs.open

This has been supperted for long but never tested nor documented.

PR-URL: https://github.com/nodejs/node/pull/3641
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
v5.x
Carl Lei 9 years ago
committed by Rod Vagg
parent
commit
77251d99de
  1. 5
      doc/api/fs.markdown

5
doc/api/fs.markdown

@ -529,6 +529,11 @@ created. On POSIX systems, `path` is considered to exist even if it is a symlink
to a non-existent file. The exclusive flag may or may not work with network file to a non-existent file. The exclusive flag may or may not work with network file
systems. systems.
`flags` can also be a number as documented by open(2); commonly used constants
are available from `require('constants')`. On Windows, flags are translated to
their equivalent ones where applicable, e.g. `O_WRONLY` to `FILE_GENERIC_WRITE`,
or `O_EXCL|O_CREAT` to `CREATE_NEW`, as accepted by CreateFileW.
On Linux, positional writes don't work when the file is opened in append mode. On Linux, positional writes don't work when the file is opened in append mode.
The kernel ignores the position argument and always appends the data to The kernel ignores the position argument and always appends the data to
the end of the file. the end of the file.

Loading…
Cancel
Save