Browse Source

docs: Fix default options for fs.createWriteStream()

The documentation for createWriteStream() references an
'encoding' property that has a default value of null. However,
this property is never referenced by createWriteStream() or
WritableState(). Instead a 'defaultEncoding' property is
referenced in WritableState() with a default of 'utf8' if no value
is supplied.

This fix updates the documentation to rename the 'encoding'
property to 'defaultEncoding' and indicate its default value of
'utf8'.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
v0.12-staging
Chris Neave 10 years ago
committed by James M Snell
parent
commit
b7229debbe
  1. 2
      doc/api/fs.markdown

2
doc/api/fs.markdown

@ -823,7 +823,7 @@ Returns a new WriteStream object (See `Writable Stream`).
`options` is an object with the following defaults:
{ flags: 'w',
encoding: null,
defaultEncoding: 'utf8',
fd: null,
mode: 0666 }

Loading…
Cancel
Save