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

Document how to test if a file exists #6752

Closed
DullReferenceException opened this issue May 14, 2016 · 3 comments
Closed

Document how to test if a file exists #6752

DullReferenceException opened this issue May 14, 2016 · 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

@DullReferenceException
Copy link

DullReferenceException commented May 14, 2016

  • Version: All
  • Platform: All
  • Subsystem: fs

The documentation for fs could use some work. Useful utilities like exists are being deprecated with nothing more than a note to use other operations and check the error. The problem is, there is no documentation for which errors you should expect to see. I know from experimentation that ENOENT seems to tell me that a file does not exist, but that is not documented.

If we just had a section explaining what a file system error looks like and a list of all of the codes, that would be a huge help in knowing how to properly write code for different scenarios.

@DullReferenceException
Copy link
Author

DullReferenceException commented May 14, 2016

It looks like there actually is a list here:

https://nodejs.org/api/errors.html#errors_class_system_error

So really, maybe all that is missing is links to that page.

@mscdex mscdex added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels May 14, 2016
@jasnell jasnell added the good first issue Issues that are suitable for first-time contributors. label Sep 9, 2016
@connium
Copy link

connium commented Sep 17, 2016

working on that

@sam-github sam-github added doc Issues and PRs related to the documentations. and removed doc Issues and PRs related to the documentations. docs-requested labels Dec 1, 2016
@bmuenzenmeyer
Copy link
Contributor

Hello there.

Was looking through good first contribution issues and it seems to me that this issue can be closed, as it's referenced PR was merged long ago.

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

7 participants