Description of Fs.symlinksync method used in Node.js _node.js

Source: Internet
Author: User
Tags symlink

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);
};

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.