-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Doc has mistake: The fs doesn't exist constants of property #8044
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@TonyPythoneer Closing. Please feel free to ask any questions edit: the docs you linked to are for v6.x |
@thealphanerd Thank you for your notification. |
@thealphanerd I just encountered the issue when I tried to access I'm on node v6.1.0 and I can confirm that there isn't a Simple test :
Output :
EDIT : Sorry, I just realized that this change wasn't in v6.1.0. https://nodejs.org/docs/v6.1.0/api/fs.html :D |
FYI:
I use the following in my code for compatibility, e.g. fs.accessSync(binPath, (fs.constants || fs).X_OK) |
@MylesBorins Should this needs to be added to documentation also as a Note? Because post |
Feel free to send a PR to master with what you think will help and we can discuss there |
Why is this closed ? I just stumbled over this and https://nodejs.org/dist/latest-v6.x/docs/api/fs.html does not declare in which version fs.constants was added. |
Reopening, this will be closed by #12690 when it lands. |
* Add changelog history in `fs.access` for the changes introduced to `constants` in `fs` module prior to Node `<v6.3.0`. Fixes: nodejs#8044
Uh oh!
There was an error while loading. Please reload this page.
The API doc describes the constants will return a object:
https://nodejs.org/api/fs.html#fs_fs_constants
But, in fact, fs doesn't exist constants of property.
The fs shows on console as following:
I suggest it should mark the property has been deprecated. Otherwise, it will cause misunderstanding.
The text was updated successfully, but these errors were encountered: