fs.symlink()

fs.symlink(target, path[, type], callback)

Asynchronous symlink(2). No arguments other than a possible exception are given to the completion callback. The type argument can be set to 'dir', 'file', or 'junction' (default is 'file') and is only available on Windows (ignored on other platforms). Note that Windows junction points require the destination path to be absolute. When using 'junction', the target argument will automatically be normalized to absolute path.

Here is an example below:

fs.symlink('./foo', './new-port');

It creates a symbolic link named "new-port" that points to "foo".

doc_Nodejs
2016-04-30 04:39:56
Comments
Leave a Comment

Please login to continue.