Create a
directory symbolic link. The target path can be either
absolute or relative and need not refer to an existing directory. The
order of arguments follows the POSIX convention.
To remove an existing directory symbolic link, use
removeDirectoryLink.
Although the distinction between
file symbolic links and
directory symbolic links does not exist on POSIX systems, on
Windows this is an intrinsic property of every symbolic link and
cannot be changed without recreating the link. A file symbolic link
that actually points to a directory will fail to dereference and vice
versa. Moreover, creating symbolic links on Windows may require
privileges unavailable to users outside the Administrators group.
Portable programs that use symbolic links should take both into
consideration.
On Windows, the function is implemented using
CreateSymbolicLink with
SYMBOLIC_LINK_FLAG_DIRECTORY. Since 1.3.3.0, the
SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE flag is also
included if supported by the operating system. On POSIX, this is an
alias for
createFileLink and is therefore atomic.
Windows-specific errors: This operation may fail with
permissionErrorType if the user lacks the privileges to create
symbolic links. It may also fail with
illegalOperationErrorType
if the file system does not support symbolic links.