Skip to content

Path.lstatSync() method

pathlib-ts > Path > lstatSync

Retrieves symlink metadata synchronously.

Signature:

lstatSync(): Stats;

Returns:

Stats

The fs.Stats class describing the link entry.

Delegates to fs.lstatSync, exposing the symlink’s own information even when it points elsewhere.

Reading metadata for a symbolic link

import { Path } from "pathlib-ts";
const link = new Path("./node_modules/.bin/tsc");
const info = link.lstatSync();
console.log(info.isSymbolicLink());