Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/xdg/vendor/types/deno.d.ts>Deno.readLinkSync

Determine XDG Base Directory paths (OS/platform portable)
Go to Latest
function Deno.readLinkSync
import { Deno } from "https://deno.land/x/xdg@v10.3.0/vendor/types/deno.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 | URL

Returns

string