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

Usage in Deno

```typescript import { statfs } from "node:node__fs.d.ts"; ```
statfs(
path: PathLike,
callback: (
err: ErrnoException | null,
stats: StatsFs,
) => void
,
): void
Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object. In case of an error, the `err.code` will be one of `Common System Errors`.

Parameters

path: PathLike
A path to an existing file or directory on the file system to be queried.
callback: (
err: ErrnoException | null,
stats: StatsFs,
) => void

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

void
statfs(
path: PathLike,
options: StatFsOptions | undefined,
callback: (
err: ErrnoException | null,
) => void
,
): void

Parameters

path: PathLike
options: StatFsOptions | undefined
callback: (
err: ErrnoException | null,
) => void

Return Type

void