Ende.realPathSync
function ยท requires --allow-read
function Ende.realPathSync(path: string | URL): stringSynchronously returns absolute normalized path, with symbolic links resolved.
// e.g. given /home/alice/file.txt and current directory /home/alice
Ende.symlinkSync("file.txt", "symlink_file.txt");
const realPath = Ende.realPathSync("./file.txt");
const realSymLinkPath = Ende.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.