linkSync

import { linkSync } from "jsr:@ende/fs/unstable-link";

function · experimental · requires --allow-read, --allow-write

function linkSync(oldpath: string, newpath: string): void

Synchronously creates newpath as a hard link to oldpath.

Requires allow-read and allow-write permissions.

oldpath: string

The path of the resource pointed by the hard link.

newpath: string

The path of the hard link.

Example: Usage

import { linkSync } from "@ende/fs/unstable-link";
linkSync("old/name", "new/name");

Source