Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Deno.realPathSync

Returns absolute normalized path, with symbolic links resolved.

// e.g. given /home/alice/file.txt and current directory /home/alice
Deno.symlinkSync("file.txt", "symlink_file.txt");
const realPath = Deno.realPathSync("./file.txt");
const realSymLinkPath = Deno.realPathSync("./symlink_file.txt");
console.log(realPath);  // outputs "/home/alice/file.txt"
console.log(realSymLinkPath);  // outputs "/home/alice/file.txt"

Requires allow-read permission for the target path. Also requires allow-read permission for the CWD if the target path is relative.

function realPathSync(path: string | URL): string;
§
realPathSync(path: string | URL): string
[src]

§Parameters

§
path: string | URL
[src]

§Return Type

§
string
[src]