Uh oh!
There was an error while loading. Please reload this page.
doc: add flags section to document all flags - #20042
Conversation
There was a problem hiding this comment.
It'll be helpful if flags are sorted in alphabetical order
There was a problem hiding this comment.
ok, I'm on it!
Would it also make sense to rearrange the existing flag on open() to also be rearranged, or is there a reason to keep the other ones in their original order?
There was a problem hiding this comment.
I'll let @nodejs/fs take a call, in fs.open() the flags are separated into read and write ones.
I don't think the description for flags should be repeated in the documentation. In my opinion, fs.open() should also link to this description for flags.
There was a problem hiding this comment.
I think sorting the flags is a good idea.
There was a problem hiding this comment.
Thanks, they should now be sorted and consolidated in one area!
joyeecheung
left a comment
There was a problem hiding this comment.
Can you replace the description of flags in fs.open with a link to the newly added section to avoid duplication?
indranil
commented
Apr 15, 2018
Removed any other area where the flag descriptions were being duplicated into one area that is being linked from everywhere. |
There was a problem hiding this comment.
The behavior of fs.open() is platform-specific for some flags
There was a problem hiding this comment.
In fsPromises.open(), a FileHandle instead of file descriptor is returned. Are those different @joyeecheung ?
There was a problem hiding this comment.
Good point!
I thought that both fs.open() and fsPromises.open() have the same caveats, so I included those together. If FileHandle differs from the file descriptor, then it might make sense to put them within their respective function descriptions.
There was a problem hiding this comment.
File System flags is not part of FS Constants, this should be a separate section by changing to ## File System Flags
c5a7c21 to
c73d576CompareThere was a problem hiding this comment.
Nit: please always just use single line breaks. So all the added line breaks here are obsolete.
There was a problem hiding this comment.
Thank you for the pointer! Fixed in latest commit!
BridgeAR
commented
Apr 15, 2018
@nodejs/documentation @nodejs/fs PTAL |
c73d576 to
5134ffcCompareThere was a problem hiding this comment.
It seems we have two full sentences here now, so we need to add periods after the both to be consistent with other docs:
See [support of file system `flags`][]. **Default:** `'a'`.
The same for all the cases below (if Default is missing then only one period is needed).
There was a problem hiding this comment.
There are only 2 references here out of ASCII sorting, so let's do not increase the disorder and add this at the end of the list, after [inode]: and two other stray references.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
This should be taken care of as well :)
There was a problem hiding this comment.
a file descriptor -> a file descriptor or a `FileHandle`?
There was a problem hiding this comment.
`fs.open` or `fs.writeFile` -> `fs.open()` or `fs.writeFile()`?
vsemozhetbyt
left a comment
There was a problem hiding this comment.
It seems nothing is missed while merging.
LGTM with nits addressed.
Thank you!
5134ffc to
9ee3214Compare
This comment has been minimized.
This comment has been minimized.
trivikr
commented
Apr 18, 2018
@indranil Kindly remove merge commit and use rebase instead as described in contributing guidelines |
26bdc14 to
c57b08cCompareindranil
commented
Apr 20, 2018
sorry this took so long, but finally removed and rebased and repushed! |
This comment has been minimized.
This comment has been minimized.
trivikr
commented
Apr 20, 2018
@indranil The nits mentioned by @vsemozhetbyt still need to be addressed. |
c57b08c to
f51eef1Compareindranil
commented
Apr 20, 2018
omg so sorry my merge undid all those changes! redid them and pushed them, thank you! |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Md-lint finds trailing tab here)
There was a problem hiding this comment.
Md-lint finds trailing tab here)
Adds a section at the very end to document all flags and links to it from every function that takes a flag argument. Fixes: nodejs#16971
Removed description of flags into one place, linking to it from all other references. Also rearranged the flags alphabetically, keeping connected ones together. Fixes: nodejs#16971
Addressing comments
Removed unnecessary newlines from the end of document
Finally able to resolve the merge conflicts
All changes in the previous commits, consolidated location, adding periods, putting notes together were wiped away by my clumsy merge. Redid them all!
Two trailing tabs caught by the linter removed
f51eef1 to
4b70819Compareindranil
commented
Apr 20, 2018
thank you for that! fixed that now :) |
vsemozhetbyt
commented
Apr 20, 2018
vsemozhetbyt
commented
Apr 20, 2018
If there are no objections, I will land soon. |
trivikr
commented
Apr 20, 2018
Landed in 53822f6 |
Adds a section at the very end to document all flags and links to it from every function that takes a flag argument.
I kept the flags that were in fs.open() for people who are familiar with the docs already.
Fixes: #16971
Checklist