doc: clarify fs.write[Sync]() descriptions#22402
Closed
vsemozhetbyt wants to merge 1 commit intonodejs:masterfrom
vsemozhetbyt:doc-fs-write-sync-links
Closed
doc: clarify fs.write[Sync]() descriptions#22402vsemozhetbyt wants to merge 1 commit intonodejs:masterfrom vsemozhetbyt:doc-fs-write-sync-links
vsemozhetbyt wants to merge 1 commit intonodejs:masterfrom
vsemozhetbyt:doc-fs-write-sync-links
Conversation
1. All default values for optional `encoding` parameters were documented except for the one in `fs.write(fd, string...)` method. This PR makes up this deficiency. Refs: https://github.com/nodejs/node/blob/a04f2f7df630427bf869b1e04040975b752973b6/lib/fs.js#L549 2. We have two variants of `fs.write()` / `fs.writeSync()` methods: for buffers and strings. Currently, the sync methods have only one common reference to the full description of async methods. However, the link may seem to belong to the last sync variant only (for strings) and, as it refers to the first async variant (for buffers), this may be confusing. This PR makes two different sync variants refer to two different async variants. 3. In passing, both returned values of sync methods were also made more concise and unambiguous.
Contributor
Author
|
Node.js Collaborators, please, add 👍 here if you approve fast-tracking. |
TimothyGu
approved these changes
Aug 19, 2018
benjamingr
approved these changes
Aug 19, 2018
Member
benjamingr
left a comment
There was a problem hiding this comment.
Changes LGTM. Thanks for all the amazing doc work you've been putting in! 🎉
lpinca
approved these changes
Aug 19, 2018
vsemozhetbyt
added a commit
that referenced
this pull request
Aug 19, 2018
1. All default values for optional `encoding` parameters were documented except for the one in `fs.write(fd, string...)` method. This PR makes up this deficiency. 2. We have two variants of `fs.write()` / `fs.writeSync()` methods: for buffers and strings. Currently, the sync methods have only one common reference to the full description of async methods. However, the link may seem to belong to the last sync variant only (for strings) and, as it refers to the first async variant (for buffers), this may be confusing. This PR makes two different sync variants refer to two different async variants. 3. In passing, both returned values of sync methods were also made more concise and unambiguous. PR-URL: #22402 Refs: https://github.com/nodejs/node/blob/a04f2f7df630427bf869b1e04040975b752973b6/lib/fs.js#L549 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Contributor
Author
|
Landed in 7108893 Thank you for the reviews. And for the kind words) |
targos
pushed a commit
that referenced
this pull request
Aug 21, 2018
1. All default values for optional `encoding` parameters were documented except for the one in `fs.write(fd, string...)` method. This PR makes up this deficiency. 2. We have two variants of `fs.write()` / `fs.writeSync()` methods: for buffers and strings. Currently, the sync methods have only one common reference to the full description of async methods. However, the link may seem to belong to the last sync variant only (for strings) and, as it refers to the first async variant (for buffers), this may be confusing. This PR makes two different sync variants refer to two different async variants. 3. In passing, both returned values of sync methods were also made more concise and unambiguous. PR-URL: #22402 Refs: https://github.com/nodejs/node/blob/a04f2f7df630427bf869b1e04040975b752973b6/lib/fs.js#L549 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos
pushed a commit
that referenced
this pull request
Sep 3, 2018
1. All default values for optional `encoding` parameters were documented except for the one in `fs.write(fd, string...)` method. This PR makes up this deficiency. 2. We have two variants of `fs.write()` / `fs.writeSync()` methods: for buffers and strings. Currently, the sync methods have only one common reference to the full description of async methods. However, the link may seem to belong to the last sync variant only (for strings) and, as it refers to the first async variant (for buffers), this may be confusing. This PR makes two different sync variants refer to two different async variants. 3. In passing, both returned values of sync methods were also made more concise and unambiguous. PR-URL: #22402 Refs: https://github.com/nodejs/node/blob/a04f2f7df630427bf869b1e04040975b752973b6/lib/fs.js#L549 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This was referenced Sep 6, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAll default values for optional
encodingparameters were documented except for the one infs.write(fd, string...)method. This PR makes up this deficiency.Refs:
node/lib/fs.js
Line 549 in a04f2f7
We have two variants of
fs.write()/fs.writeSync()methods: for buffers and strings. Currently, the sync methods have only one common reference to the full description of async methods. However, the link may seem to belong to the last sync variant only (for strings) and, as it refers to the first async variant (for buffers), this may be confusing. This PR makes two different sync variants refer to two different async variants.In passing, both returned values of sync methods were also made more concise and unambiguous.