对fs.link方法在Node.js的使用说明

对fs.link方法在Node.js的使用说明
方法显示:

创建硬链接。

Grammar:

复制代码代码如下所示:

Fs.link(srcpath,dstpath,{回调(ERR)))
由于此方法属于fs模块,因此需要在使用之前引入FS模块(var FS =需求(fs))。

接收参数:

srcpath是源目录或文件的路径

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

回调回调,传递异常参数

源代码 uff1a

复制代码代码如下所示:

fs.link =功能(srcpath,dstpath,回调){

回调= makecallback(回调);

如果(!NullCheck(srcpath,回调))返回;

如果(!NullCheck(dstpath,回调))返回;

Binding.link(pathmodule _makelong(srcpath),

PathModule _makelong(dstpath),

回调);

};

tag:使用说明方法电脑软件fslink

相关内容