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.