Skip to content
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.readFile with encoding as 2nd argument is not documented #1797

Closed
rla opened this issue May 26, 2015 · 3 comments
Closed

fs.readFile with encoding as 2nd argument is not documented #1797

rla opened this issue May 26, 2015 · 3 comments
Labels
doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. good first issue Issues that are suitable for first-time contributors.

Comments

@rla
Copy link

rla commented May 26, 2015

It is very common to call fs.readFile with the encoding name directly as the 2nd argument. Like

fs.readFile('my_file.txt', 'utf8', cb)

Yet this call signature is not clearly documented:

https://iojs.org/api/fs.html#fs_fs_readfile_filename_options_callback (link date 2015-05-26)

@bnoordhuis
Copy link
Member

I don't think anyone will object to a documentation PR.

@brendanashworth brendanashworth added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. good first issue Issues that are suitable for first-time contributors. labels May 26, 2015
@Trott
Copy link
Member

Trott commented May 27, 2015

PR #1806 submitted to address this.

Fishrock123 pushed a commit that referenced this issue May 27, 2015
Fixes: #1797
PR-URL: #1806
Reviewed-By: fishrock123@rocketmail.com
@Fishrock123
Copy link
Member

Fixed in ff79449!

andrewdeandrade pushed a commit to andrewdeandrade/node that referenced this issue Jun 3, 2015
Fixes: nodejs/node#1797
PR-URL: nodejs/node#1806
Reviewed-By: fishrock123@rocketmail.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. good first issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

No branches or pull requests

5 participants