-
Notifications
You must be signed in to change notification settings - Fork 7.3k
docs: added return value of sync fs functions #9359
Conversation
@@ -340,19 +340,26 @@ the end of the file. | |||
|
|||
## fs.openSync(path, flags, [mode]) | |||
|
|||
Synchronous version of `fs.open()`. | |||
Synchronous version of `fs.open()`. 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.
fs.openSync
actually returns an integer:
$ touch foo.txt
$ ./node -e 'console.log(require("fs").openSync("./foo.txt", "r"))'
12
$
@tyleranton Thank you for the pull request! Overall it looks good, except for a few comments that I added inline. Let me know if you have any questions! |
@misterdjules Ah thanks! I don't know how I missed |
@tyleranton You don't need to create another PR, you can just push in the same branch and it will update the pull request automatically. You will need to squash your commits into just one commit though. Thank you! |
Clarifies that synchronous functions in fs with no return value, return undefined. Fixes #9313 docs: added return value of sync fs functions Clarifies that synchronous functions in fs with no return value, return undefined. Fixes #9313 Corrected return values for fs.openSync and fs. existsSync Specified that fs.openSync() returns an integer and fs.existsSync() returns true or false
@misterdjules done! |
LGTM 👍, thanks @tyleranton! |
@misterdjules Awesome! Happy to start contributing. Definitely let me know of anymore issues I can tackle. |
Clarify that synchronous functions in fs with no return value return undefined. Specify that fs.openSync() returns an integer and fs.existsSync() returns true or false. Fixes nodejs#9313 PR: nodejs#9359 PR-URL: nodejs#9359 Reviewed-By: Julien Gilli <[email protected]>
Landed in 51fe319. |
@tyleranton I will and thank you very much for your contribution! Please join us in #libuv on Freenode so that we can know more about your technical background and discuss what type of contributions you'd be more interested in. See you soon! |
Clarify that synchronous functions in fs with no return value return undefined. Specify that fs.openSync() returns an integer and fs.existsSync() returns true or false. Fixes nodejs#9313 PR: nodejs#9359 PR-URL: nodejs/node-v0.x-archive#9359 Reviewed-By: Julien Gilli <[email protected]> Conflicts: doc/api/fs.markdown
Clarify that synchronous functions in fs with no return value return undefined. Specify that fs.openSync() returns an integer and fs.existsSync() returns true or false. Fixes nodejs#9313 PR: nodejs#9359 PR-URL: nodejs/node-v0.x-archive#9359 Reviewed-By: Julien Gilli <[email protected]> Conflicts: doc/api/fs.markdown
Clarify that synchronous functions in fs with no return value return undefined. Specify that fs.openSync() returns an integer and fs.existsSync() returns true or false. Fixes: nodejs/node-v0.x-archive#9313 PR: nodejs/node-v0.x-archive#9359 Reviewed-By: Julien Gilli <[email protected]> PORT-FROM: joyent/node @ 51fe319 PR-URL: nodejs#1770 Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Conflicts: doc/api/fs.markdown
Clarify that synchronous functions in fs with no return value return undefined. Specify that fs.openSync() returns an integer and fs.existsSync() returns true or false. Fixes: nodejs/node-v0.x-archive#9313 PR: nodejs/node-v0.x-archive#9359 Reviewed-By: Julien Gilli <[email protected]> PORT-FROM: joyent/node @ 51fe319faf4399fd027f8b32d1c425200b911e44 PR-URL: nodejs/node#1770 Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Conflicts: doc/api/fs.markdown
Clarifies that synchronous functions in fs with no return value, return
undefined
.Fixes #9313