Path.lstatSync() method
pathlib-ts > Path > lstatSync
Path.lstatSync() method
Section titled “Path.lstatSync() method”Retrieves symlink metadata synchronously.
Signature:
lstatSync(): Stats;Returns:
Stats
The fs.Stats class describing the link entry.
Remarks
Section titled “Remarks”Delegates to fs.lstatSync, exposing the symlink’s own information even when it points elsewhere.
Example
Section titled “Example”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());