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

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

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

Resolves to the absolute normalized path, with symbolic links resolved.

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

Requires allow-read permission.

Parameters

path: string

Returns

Promise<string>