Optional
type: null | Typev0.1.31
Asynchronous symlink(2) - Create a new symbolic link to an existing file.
A path to an existing file. If a URL is provided, it must use the file:
protocol.
A path to the new symlink. If a URL is provided, it must use the file:
protocol.
Generated using TypeDoc
Creates the link called
path
pointing totarget
. No arguments other than a possible exception are given to the completion callback.See the POSIX
symlink(2)
documentation for more details.The
type
argument is only available on Windows and ignored on other platforms. It can be set to'dir'
,'file'
, or'junction'
. If thetype
argument is not a string, Node.js will autodetecttarget
type and use'file'
or'dir'
. If thetarget
does not exist,'file'
will be used. Windows junction points require the destination path to be absolute. When using'junction'
, thetarget
argument will automatically be normalized to absolute path. Junction points on NTFS volumes can only point to directories.Relative targets are relative to the link's parent directory.
The above example creates a symbolic link
mewtwo
which points tomew
in the same directory: