Skip to content
Browse files

doc: add note for platform specific flags ``

Note describing platform specific differences in

E.g.'<directory>', 'a+', console.log)

Fixes: #3643
PR-URL: #6136
Reviewed-By: Roman Reiss <>
Reviewed-By: Benjamin Gruenbaum <>
Reviewed-By: James M Snell <>
  • Loading branch information...
eljefedelrodeodeljefe authored and jasnell committed Apr 21, 2016
1 parent a3b5b9c commit ae991e757732aad13af1a4b2ecf66840937f04e1
Showing with 17 additions and 0 deletions.
  1. +17 −0 doc/api/
@@ -795,6 +795,23 @@ 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 end of the file.

_Note: The behavior of `` is platform specific for some flags. As such,
opening a directory on OS X and Linux with the `'a+'` flag - see example below -
will return an error. Whereas on Windows and FreeBSD a file descriptor will be

// OS X and Linux'<directory>', 'a+', (err, fd) => {
// => [Error: EISDIR: illegal operation on a directory, open <directory>]
// Windows and FreeBSD'<directory>', 'a+', (err, fd) => {
// => null, <fd>

## fs.openSync(path, flags[, mode])

* `path` {String | Buffer}

0 comments on commit ae991e7

Please sign in to comment.
You can’t perform that action at this time.