Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/levo/lib/lib.deno_runtime.d.ts>Deno.realPathSync

Server side rendering with The Elm Architecture in Deno
Latest
function Deno.realPathSync
import { Deno } from "https://deno.land/x/levo@v0.0.27/lib/lib.deno_runtime.d.ts";
const { realPathSync } = Deno;

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.

Parameters

path: string

Returns

string