-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs: set encoding on fs.createWriteStream #1844
Conversation
Please re-review for document and test. |
const secondEncoding = 'binary'; | ||
|
||
const examplePath = path.join(common.fixturesDir, 'x.txt'); | ||
const dummyPath = path.join(common.tmpDir, '/x.txt'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra /
in the second argument to path.join()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. fixed.
Thank you. Fixed. |
I will land this when CI is healthy. |
Enable encoding option on fs.createWriteStream. PR-URL: #1844 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
landed 8357c50 |
Enable encoding option on fs.createWriteStream. PR-URL: nodejs/node#1844 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
I just separated #1412 .
Much time passed since I proposed the pull request. Sorry.
I would like to introduce the pull request again.
According to the createWriteStream api docs,
encoding
option could be found.But I set the encoding option to fs.createWriteStream('foo.txt', {encoding: 'utf8'}), the encoding option is ignored. I fixed the problem.
And I added the
encoding
description in this doc. and I fixed test to avoid linter error.