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

Clarify "fs.readFile", "fs.appendFile", "fs.writeFile" documentation regarding closing #7560

Closed
kibertoad opened this issue Jul 6, 2016 · 6 comments
Labels
doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system.

Comments

@kibertoad
Copy link
Contributor

"https://nodejs.org/api/fs.html#fs_fs_readfile_file_options_callback" states that

Note: Specified file descriptors will not be closed automatically.

This is confusing for new users, because it implies that opened file should always be manually closed, leading to questions like this - http://stackoverflow.com/questions/21523890/close-file-after-fs-readfile-nulling

It should be mentioned that if "file" is specified as a filename, it will, indeed, be closed automatically.

@kibertoad
Copy link
Contributor Author

Here is the pull request: #7561

@mscdex mscdex added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Jul 6, 2016
@kibertoad
Copy link
Contributor Author

Emmm, so what is left before this change can be pulled?..

@kibertoad
Copy link
Contributor Author

I have two LGTMs on the pull request. If current blocker is the latest comment from the fourth reviewer, could I get a second opinion on that? Currently I have doubts about whether the suggested change should be made, but if someone else agrees it would be for the best, I'll make it.

@addaleax
Copy link
Member

@kibertoad For one, it’s a bit confusing to see comments that are only about the PR to pop up on the thread for the corresponding issue. ;)

@kibertoad
Copy link
Contributor Author

kibertoad commented Jul 15, 2016

@addaleax True, but for some reason comments about the PR inside the PR are ignored :). What would be the more appropriate way to keep things progressing?

@addaleax
Copy link
Member

@kibertoad I think the occasional “ping”/“bump”/… comment on a PR which hasn’t received feedback for a couple of days is pretty much okay.

addaleax pushed a commit that referenced this issue Aug 8, 2016
Ref: #7560
PR-URL: #7561
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@addaleax addaleax closed this as completed Aug 8, 2016
cjihrig pushed a commit that referenced this issue Aug 10, 2016
Ref: #7560
PR-URL: #7561
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
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.
Projects
None yet
Development

No branches or pull requests

3 participants