Method description:
Synchronous version of fs.link().
grammar:
The code copy is as follows:
fs.linkSync(srcpath, dstpath)
Since this method belongs to the fs module, it is necessary to introduce the fs module before use (var fs= require("fs") )
Receive parameters:
srcpath is the path to the source directory or file
dstpath It is the path to store the converted directory, and defaults to the current working directory
Source code:
The code copy is as follows:
fs.linkSync = function(srcpath, dstpath) {
nullCheck(srcpath);
nullCheck(dstpath);
return binding.link(pathModule._makeLong(srcpath),
pathModule._makeLong(dstpath));
};