createLinkPointingTo

inline fun Path.createLinkPointingTo(target: Path): Path(source)

Creates a new link (directory entry) located by this path for the existing file target.

Calling this function may require the process to be started with implementation specific privileges to create hard links or to create links to directories.

Since Kotlin

1.5

See also

Throws

if a file with this name already exists (optional specific exception, some implementations may throw a more general one).

if the implementation does not support creating a hard link.