Reputation: 585
I got this on fs.rename from the docs -- http://nodejs.org/api/fs.html
fs.rename(oldPath, newPath, callback)
Explanation:
Asynchronous rename(2). No arguments other than a possible exception are given to the completion callback.
However I don't really understand what this is because I am new to programming. Its a 2 word explanation with the explanation containing the word that it needs to explain:
What is fs.rename, Asynchronous rename.
I find this a bit annoying and confusing.
Same goes for this:
fs.ftruncate(fd, len, callback)
Explanation:
Asynchronous ftruncate(2).
A huge amount of the node api docs are like this and its giving me a hard time. Is there a better resource I can use to understand what these mean?
Upvotes: 3
Views: 468
Reputation: 798456
It's not "asynchronous rename", it's "asynchronous rename(2)
". The number in parens refers to the man page section it is found in, and section 2 is system calls. You are expected to read the man page (man 2 rename
in a terminal) in order to learn about the original synchronous function. The same applies to ftruncate(2)
.
Upvotes: 3