-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Deprecate fs.exists or fix its API #103
Comments
Yes! Option 1 is my vote. This is a tiny black spot on the Node fs API. |
+1 for deprecating. This was already being discussed in nodejs/node-v0.x-archive#8418. |
+1 on option 1. |
👍 for deprecating |
Sounds reasonable. @cjihrig Go for it. |
@cjihrig yes please! The fix looks pretty solid and so far everyone is for deprecating it. |
@cjihrig 👍 here |
Summoning @caineio |
Hello! I am pleased to see your valuable contribution to this project. Would you Questions:
Please provide the answers in an ordered list like this:
Note that I am just a bot with a limited human-reply parsing abilities, In case of success I will say: In case of validation problem I will say: Truly yours, Responsibilities
|
|
@caineio what's up with you? Why are you ignoring this? |
Ah, gotcha. It was assigned! |
...summoning the core team devs! |
|
Awesome news :) Thanks a ton. |
I am sad at this deprecation. |
We have an npm module now: https://github.com/sindresorhus/path-exists |
fs.exists is being deprecated, see: nodejs/node#103.
/facepalm How was this not sufficient:
|
Because I don't want to open the file. |
Please see: #1592 |
fs.exists
is infamous for having an inconsistent non-nodeback API that confuses new users often and can be a pain spot.I see two good alternatives:
fs.stat
instead + discuss the inherent problem with usingexists
(race condition). Add a big warning. Optionallyconsole.log
a deprecation notice when the server is first started.Personally I'm for the first. Let's clean up
fs
:)The text was updated successfully, but these errors were encountered: