docs: more explicit argument names in fs
This commit is contained in:
parent
f065c87bcf
commit
0a83b78ba8
@ -62,12 +62,12 @@ the entire process until they complete--halting all connections.
|
|||||||
Relative path to filename can be used, remember however that this path will be relative
|
Relative path to filename can be used, remember however that this path will be relative
|
||||||
to `process.cwd()`.
|
to `process.cwd()`.
|
||||||
|
|
||||||
## fs.rename(path1, path2, [callback])
|
## fs.rename(oldPath, newPath, [callback])
|
||||||
|
|
||||||
Asynchronous rename(2). No arguments other than a possible exception are given
|
Asynchronous rename(2). No arguments other than a possible exception are given
|
||||||
to the completion callback.
|
to the completion callback.
|
||||||
|
|
||||||
## fs.renameSync(path1, path2)
|
## fs.renameSync(oldPath, newPath)
|
||||||
|
|
||||||
Synchronous rename(2).
|
Synchronous rename(2).
|
||||||
|
|
||||||
@ -174,14 +174,14 @@ the completion callback.
|
|||||||
|
|
||||||
Synchronous link(2).
|
Synchronous link(2).
|
||||||
|
|
||||||
## fs.symlink(linkdata, path, [type], [callback])
|
## fs.symlink(destination, path, [type], [callback])
|
||||||
|
|
||||||
Asynchronous symlink(2). No arguments other than a possible exception are given
|
Asynchronous symlink(2). No arguments other than a possible exception are given
|
||||||
to the completion callback.
|
to the completion callback.
|
||||||
`type` argument can be either `'dir'` or `'file'` (default is `'file'`). It is only
|
`type` argument can be either `'dir'` or `'file'` (default is `'file'`). It is only
|
||||||
used on Windows (ignored on other platforms).
|
used on Windows (ignored on other platforms).
|
||||||
|
|
||||||
## fs.symlinkSync(linkdata, path, [type])
|
## fs.symlinkSync(destination, path, [type])
|
||||||
|
|
||||||
Synchronous symlink(2).
|
Synchronous symlink(2).
|
||||||
|
|
||||||
@ -513,7 +513,7 @@ callback, and have some fallback logic if it is null.
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
## fs.exists(p, [callback])
|
## fs.exists(path, [callback])
|
||||||
|
|
||||||
Test whether or not the given path exists by checking with the file system.
|
Test whether or not the given path exists by checking with the file system.
|
||||||
Then call the `callback` argument with either true or false. Example:
|
Then call the `callback` argument with either true or false. Example:
|
||||||
@ -523,7 +523,7 @@ Then call the `callback` argument with either true or false. Example:
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
## fs.existsSync(p)
|
## fs.existsSync(path)
|
||||||
|
|
||||||
Synchronous version of `fs.exists`.
|
Synchronous version of `fs.exists`.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user