Skip to main content
function 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.

Parameters

path: string

Returns

string