对fs.linksync方法在Node.js的使用说明
方法显示:Fs.link()的同步版本。
Grammar:
复制代码代码如下所示:
Fs.linkSync(srcpath,dstpath)
由于此方法属于fs模块,因此需要在使用之前引入FS模块(var FS =需求(fs))。
接收参数:
srcpath是源目录或文件的路径
dstpath是存储转换的目录,默认为当前工作目录的路径
源代码 uff1a
复制代码代码如下所示:
fs.linksync =功能(srcpath,dstpath){
NullCheck(srcpath);
NullCheck(dstpath);
返回binding.link(pathmodule _makelong(srcpath),
PathModule。_makelong(dstpath));
};