Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno/cli/js/lib.deno.ns.d.ts>Deno.readLinkSync

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.readLinkSync
import { Deno } from "https://deno.land/x/deno@v1.0.0/cli/js/lib.deno.ns.d.ts";
const { readLinkSync } = Deno;

Returns the full path destination of the named symbolic link.

  Deno.symlinkSync("./test.txt", "./test_link.txt");
  const target = Deno.readLinkSync("./test_link.txt"); // full path of ./test.txt

Throws TypeError if called with a hard link

Requires allow-read permission.

Parameters

path: string

Returns

string