Ftruncate
Bun

function

fs.promises.truncate

function truncate(
path: PathLike,
len?: number
): Promise<void>;

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

@returns

Fulfills with undefined upon success.

Referenced types

type PathLike = string | Buffer | URL

Valid types for path values in "fs".