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

Usage in Deno

```typescript import { lstat } from "node:node__fs.d.ts"; ```
lstat(
path: PathLike,
callback: (
err: ErrnoException | null,
stats: Stats,
) => void
,
): void
Retrieves the `fs.Stats` for the symbolic link referred to by the path. The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic link, then the link itself is stat-ed, not the file that it refers to. See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details.

Parameters

path: PathLike
callback: (
err: ErrnoException | null,
stats: Stats,
) => void

Return Type

void
lstat(
path: PathLike,
options: (StatOptions & { bigint?: false | undefined; }) | undefined,
callback: (
err: ErrnoException | null,
stats: Stats,
) => void
,
): void

Parameters

path: PathLike
options: (StatOptions & { bigint?: false | undefined; }) | undefined
callback: (
err: ErrnoException | null,
stats: Stats,
) => void

Return Type

void
lstat(
path: PathLike,
options: StatOptions & { bigint: true; },
callback: (
err: ErrnoException | null,
stats: BigIntStats,
) => void
,
): void

Parameters

path: PathLike
options: StatOptions & { bigint: true; }
callback: (
err: ErrnoException | null,
stats: BigIntStats,
) => void

Return Type

void
lstat(
path: PathLike,
options: StatOptions | undefined,
callback: (
err: ErrnoException | null,
stats: Stats | BigIntStats,
) => void
,
): void

Parameters

path: PathLike
options: StatOptions | undefined
callback: (
err: ErrnoException | null,
stats: Stats | BigIntStats,
) => void

Return Type

void