Path.symlinkTo

void symlinkTo(string target) const

Create a symbolic link at this path pointing to the given target.

On POSIX, this uses the symlink() syscall. On Windows, this calls CreateSymbolicLinkW (with a fallback retry without the unprivileged flag on older systems).

Parameters

targetThe path to the file or directory to link to (source).

Throws

Exception on failure.