金狮镖局 Design By www.egabc.com

方法说明:

同步版的 fs.link() 。

语法:

复制代码 代码如下:
fs.linkSync(srcpath, dstpath)

由于该方法属于fs模块,使用前需要引入fs模块(var fs= require(“fs”) )

接收参数:

srcpath        为源目录或文件的路径

dstpath       它是存放转换后的目录的路径,默认为当前工作目录

源码:

复制代码 代码如下:
fs.linkSync = function(srcpath, dstpath) {
  nullCheck(srcpath);
  nullCheck(dstpath);
  return binding.link(pathModule._makeLong(srcpath),
                      pathModule._makeLong(dstpath));
};

标签:
node.js,fs.linkSync方法

金狮镖局 Design By www.egabc.com
金狮镖局 免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
金狮镖局 Design By www.egabc.com

评论“node.js中的fs.linkSync方法使用说明”

暂无node.js中的fs.linkSync方法使用说明的评论...