symlink
import { symlink } from "jsr:@ende/fs/unstable-symlink";function · experimental · requires --allow-read, --allow-write
async function symlink(oldpath: string | URL, newpath: string | URL, options?: SymlinkOptions): Promise<void>Creates newpath as a symbolic link to oldpath.
The options.type parameter can be set to "file", "dir" or "junction".
This argument is only available on Windows and ignored on other platforms.
Requires full allow-read and allow-write permissions.
oldpath: string | URLThe path of the resource pointed by the symbolic link.
newpath: string | URLThe path of the symbolic link.
options?: SymlinkOptionsOptions when creating a symbolic link.
Example: Usage
import { symlink } from "@ende/fs/unstable-symlink";
await symlink("README.md", "README.md.link");