preallocate method

void preallocate(
  1. int length
)

Preallocates physical space for at least length bytes.

macOS uses F_PREALLOCATE; the default extends the file with truncate, which may zero-fill.

Implementation

void preallocate(int length) => truncate(length);