Skip to main content
Module

std/fs/ensure_link.ts>ensureLinkSync

The Deno Standard Library
Latest
function ensureLinkSync
import { ensureLinkSync } from "https://deno.land/std@0.224.0/fs/ensure_link.ts";

Synchronously ensures that the hard link exists. If the directory structure does not exist, it is created.

Examples

Example 1

import { ensureLinkSync } from "https://deno.land/std@0.224.0/fs/ensure_link.ts";

ensureLinkSync("./folder/targetFile.dat", "./folder/targetFile.link.dat");

Parameters

src: string | URL

The source file path as a string or URL. Directory hard links are not allowed.

dest: string | URL

The destination link path as a string or URL.