You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Currently the docs say that these are the defaults for createWriteStream:
{flags: 'w',encoding: null,mode: 0666}
The true defaults are the following:
{ flags: 'w',
// see https://github.com/joyent/node/blob/master/lib/fs.js#L1537
+ encoding: 'binary',
// mixed in by https://github.com/joyent/node/blob/master/lib/fs.js#L1547
+ fd: null, // when passed in leads to same behavior as createReadStream's `fd` arg
mode: 0666
}
Shall I send in a pull request for the following?
add the fd argument
change to encoding: 'binary' for both read and write streams
Give an updated list of allowed encodings, along with explanations if needed:
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
case 'raw':
Thanks for the feedback — don't want to write things and have them be wrong or never merged!