Skip to content

Path.readlinkSync() method

pathlib-ts > Path > readlinkSync

Read the target of a symbolic link synchronously.

Signature:

readlinkSync(): Path;

Returns:

Path

A Path representing the symlink target.

Mirrors Path.readlink() but executes synchronously.

Inspecting a toolchain shim synchronously

import { Path } from "pathlib-ts";
const shim = new Path("./node_modules/.bin/ts-node");
console.log(shim.readlinkSync().toString());