diff options
author | Kyle E. Mitchell <kyle@kemitchell.com> | 2016-10-19 13:42:34 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-10-21 08:01:16 -0700 |
commit | e8fadd8da5a2d073815ba25a3eea470285a0b178 (patch) | |
tree | 7fa5531ddddd840c9d15c5d06cf9f657f6822f22 /lib | |
parent | 6f7cdf7ef0fbd5609f6c6dc7a3b6460361c64680 (diff) | |
download | android-node-v8-e8fadd8da5a2d073815ba25a3eea470285a0b178.tar.gz android-node-v8-e8fadd8da5a2d073815ba25a3eea470285a0b178.tar.bz2 android-node-v8-e8fadd8da5a2d073815ba25a3eea470285a0b178.zip |
fs: clarify fs.link and fs.linkSync arguments
Updates the argument names `srcpath` and `dstpath` to match the more
descriptive `existingPath` and `newPath` in the documentation.
PR-URL: https://github.com/nodejs/node/pull/9145
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fs.js | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -955,24 +955,24 @@ fs.symlinkSync = function(target, path, type) { type); }; -fs.link = function(srcpath, dstpath, callback) { +fs.link = function(existingPath, newPath, callback) { callback = makeCallback(callback); - if (!nullCheck(srcpath, callback)) return; - if (!nullCheck(dstpath, callback)) return; + if (!nullCheck(existingPath, callback)) return; + if (!nullCheck(newPath, callback)) return; var req = new FSReqWrap(); req.oncomplete = callback; - binding.link(pathModule._makeLong(srcpath), - pathModule._makeLong(dstpath), + binding.link(pathModule._makeLong(existingPath), + pathModule._makeLong(newPath), req); }; -fs.linkSync = function(srcpath, dstpath) { - nullCheck(srcpath); - nullCheck(dstpath); - return binding.link(pathModule._makeLong(srcpath), - pathModule._makeLong(dstpath)); +fs.linkSync = function(existingPath, newPath) { + nullCheck(existingPath); + nullCheck(newPath); + return binding.link(pathModule._makeLong(existingPath), + pathModule._makeLong(newPath)); }; fs.unlink = function(path, callback) { |