Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

docs: added return value of sync fs functions #9359

Closed
wants to merge 1 commit into from
Closed

docs: added return value of sync fs functions #9359

wants to merge 1 commit into from

Conversation

tyleranton
Copy link

Clarifies that synchronous functions in fs with no return value, return undefined.

Fixes #9313

@Nodejs-Jenkins Nodejs-Jenkins changed the title docs: added return value of sync fs functions docs: added return value of sync fs functions Mar 9, 2015
@@ -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`.

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
$

@misterdjules
Copy link

@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!

@tyleranton
Copy link
Author

@misterdjules Ah thanks! I don't know how I missed fs.exists ha. I'll fix those two and make another push. Will I have to create another pull request, or will it apply to this one?

@misterdjules
Copy link

@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
@tyleranton
Copy link
Author

@misterdjules done!

@misterdjules misterdjules added this to the 0.10.37 milestone Mar 10, 2015
@misterdjules
Copy link

LGTM 👍, thanks @tyleranton!

@tyleranton
Copy link
Author

@misterdjules Awesome! Happy to start contributing. Definitely let me know of anymore issues I can tackle.

misterdjules pushed a commit to misterdjules/node that referenced this pull request Mar 10, 2015
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]>
@misterdjules
Copy link

Landed in 51fe319.

@misterdjules
Copy link

@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!

Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request May 22, 2015
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
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request May 25, 2015
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
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request Jun 1, 2015
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
andrewdeandrade pushed a commit to andrewdeandrade/node that referenced this pull request Jun 3, 2015
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants