Skip to main content
promises.lstat - node__fs.d.ts - Node documentation
function promises.lstat

Usage in Deno

```typescript import { promises } from "node:node__fs.d.ts"; ```
lstat(
path: PathLike,
opts?: StatOptions & { bigint?: false | undefined; },
): Promise<Stats>
Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, in which case the link itself is stat-ed, not the file that it refers to. Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail.

Parameters

path: PathLike
optional
opts: StatOptions & { bigint?: false | undefined; }

Return Type

Promise<Stats>
Fulfills with the {fs.Stats} object for the given symbolic link `path`.
lstat(
path: PathLike,
opts: StatOptions & { bigint: true; },
): Promise<BigIntStats>

Parameters

path: PathLike
opts: StatOptions & { bigint: true; }

Return Type

Promise<BigIntStats>
lstat(
path: PathLike,
opts?: StatOptions,
): Promise<Stats | BigIntStats>

Parameters

path: PathLike
optional
opts: StatOptions

Return Type

Promise<Stats | BigIntStats>