Repository navigation
fs.createWriteStream docs does not define flags #16971
Description
Activity
- addeddocIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.
on Nov 12, 2017 Hi, thanks for reporting this issue
Is this issue tracker the correct place to report documentation issues?
Yes.
If there is a link to all the supported flags it would be useful since these are not obvious. If they are directly copied to some Operating System specific C method that is documented, a link would be useful.
I think we can add a section to doc/api/fs.md talking about the flags, and link to it in the signatures of methods that have this parameter, like this
flag{string} See [support of file system flags][]. Default:'utf8'There are also some caveats scattered around that we can move to that section , e.g.
Modifying a file rather than replacing it may require a flags mode of r+ rather than the default mode w.
On Windows, opening an existing hidden file using the w flag (either through fs.open or fs.writeFile) will fail with EPERM. Existing hidden files can be opened for writing with the r+ flag.
If you are interested in opening a PR, check out our contributing guide to get started, thanks!
- addedhelp wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.
on Apr 13, 2018 - added a commit that references this issue
on Apr 20, 2018 - added a commit that references this issue
on Jul 27, 2026
The online node docs do not mention that you can set the 'a' flag to append when calling createWriteStream() and neither do any of the links of this method.
If there is a link to all the supported flags it would be useful since these are not obvious. If they are directly copied to some Operating System specific C method that is documented, a link would be useful.
Is this issue tracker the correct place to report documentation issues?