-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
clarify the position argument of fs.read #14610
Conversation
What happen to the file position after a read using a position null or integer was not clear and you can assume that the pointer to the file position is updated even if position is an integer. close #8397
@@ -789,6 +789,7 @@ const defaults = { | |||
the file instead of the entire file. Both `start` and `end` are inclusive and | |||
start counting at 0. If `fd` is specified and `start` is omitted or `undefined`, | |||
`fs.createReadStream()` reads sequentially from the current file position. | |||
. |
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.
It seems this line is unneeded.
@@ -1639,8 +1640,8 @@ Read data from the file specified by `fd`. | |||
|
|||
`length` is an integer specifying the number of bytes to read. | |||
|
|||
`position` is an integer specifying where to begin reading from in the file. | |||
If `position` is `null`, data will be read from the current file position. | |||
`position` is an integer specifying where to begin reading from in the file, in this case the current file position is not updated. |
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.
Style guide advises wrapping lines at 80 characters.
yes, I agree with you comments, but I just saw what happen to my last PR so I don't think it worse the effort to try to help on this project, keep going like that guys |
@dcharbonnier don't give up on this project just because of some pushback. Documentation changes seem like they should be easy, but because we can't "test" them people give them extra attention and make a lot of comments. Give this PR a second chance, it's a good improvement and IMHO it will land. |
@dcharbonnier I am very sorry if my comments were abrupt or inappropriate for you. I am grateful for your effort and time as all the other collaborators. Excuse me for the tone or other possible flaws. |
@vsemozhetbyt this PR is ok ! Your comments are perfectly justified and I should read before sending this, I'm wasting your time with my mistakes. |
@dcharbonnier I am still sorry I was not more sympathetic and less dry with my nit comments and did not express gratitude before those small requests. I hope you will not infer any bad conclusions about Node.js community from my personal indiscretion. |
What happen to the file position after a read using a position null or integer was not clear and you can assume that the pointer to the file position is updated even if position is an integer. close #8397
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)