Skip to main content
promises.truncate - fs - Node documentation
function promises.truncate

Usage in Deno

import { promises } from "node:fs";
truncate(
path: PathLike,
len?: number,
): Promise<void>

Truncates (shortens or extends the length) of the content at path to len bytes.

Parameters

path: PathLike
optional
len: number = 0

Return Type

Promise<void>

Fulfills with undefined upon success.