-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.
Description
"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.
TifPun, vivmagarwal and StarkX18
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.