-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
doc: improve fs api descriptions #17679
Conversation
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts.
doc/api/fs.md
Outdated
@@ -669,8 +669,10 @@ changes: | |||
* `callback` {Function} | |||
* `err` {Error} | |||
|
|||
Asynchronous chmod(2). No arguments other than a possible exception are given | |||
to the completion callback. | |||
Asynchronously changes the mode of a file. No arguments other than a possible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe even go for “permissions” instead of “mode”? Is that clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, yes.
doc/api/fs.md
Outdated
@@ -685,7 +687,9 @@ changes: | |||
* `path` {string|Buffer|URL} | |||
* `mode` {integer} | |||
|
|||
Synchronous chmod(2). Returns `undefined`. | |||
The synchronous version of [`fs.chmod()`][]. Returns `undefined`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it duplicates content, but it would be ideal if this wasn't just a link to something else... e.g. this could be
Synchronously change the permissions of a file or throw if unable to do so.
Likewise for the other *Sync
variants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with @jasnell's suggestion.
Landing... |
Landed in 35511c8 |
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: nodejs#17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
@maclover7 thanks for landing! |
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir along with their *Sync counterparts. PR-URL: #17679 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
This improves the api descriptions for fs.chown, fs.chmod, and fs.mkdir
along with their *Sync counterparts.
I have heard from many people how bad our docs are for people not familiar with some standard POSIX functions.
https://twitter.com/sindresorhus/status/939823222517850112 is just one example. I've also been told this in person on multiple occasions.
I think it is time for us to expand and improve our documentation to make it as useful as possible to all developers.
I know this isn't a large change but I do think it is an improvement over what we currently have.
I'm also open to wording/description suggestions.
Checklist
Affected core subsystem(s)
doc