Path.isSymlink() method
pathlib-ts > Path > isSymlink
Path.isSymlink() method
Section titled “Path.isSymlink() method”Resolves to true when the path is a symbolic link.
Signature:
isSymlink(): Promise<boolean>;Returns:
Promise<boolean>
Promise resolving to true when the entry is a symbolic link.
Remarks
Section titled “Remarks”Promise wrapper around Path.isSymlinkSync().
Example
Section titled “Example”Checking links while traversing a tree
import { Path } from "pathlib-ts";
const bin = new Path("./node_modules/.bin");for (const entry of await bin.iterdir()) { if (await entry.isSymlink()) { console.log("link:", entry.name); }}