Method Description:
Sync version of Symlink (). Used to create symbolic links.
Grammar:
Copy Code code as follows:
Fs.symlinksync (Srcpath, Dstpath, [type])
Because this method belongs to the FS module, it is necessary to introduce FS module (VAR fs= require ("FS") before use.
Receive parameters:
Srcpath as the path to the source directory or file
Dstpath It is the path that holds the converted directory, and defaults to the current working directory
Type defaults: ' file ', optional ' dir ', ' file ', or ' junction ', which is only for Windows (ignored on other platforms).
Note that Windows nodes require a converted directory to be an absolute path, and when using "junction", the target parameter will automatically be normalized to the absolute path.
Source:
Copy Code code as follows:
Fs.symlinksync = function (destination, path, type) {
Type = (util.isstring (type)? type:null);
Nullcheck (destination);
Nullcheck (path);
Return Binding.symlink (preprocesssymlinkdestination (destination, type),
Pathmodule._makelong (Path),
Type);
};