Module sys/fallocate

sys/fallocate

File space pre-allocation.

Synchronous wrapper for fallocate-style allocation. Returns 0 on success, -errno on failure.

Functions

fallocate function
fn(fd : i32, mode : i32, offset : i64, length : i64) -> i32

Parameters

NameTypeNotes
fdi32
modei32
offseti64
lengthi64

Returns: i32

Constants

FALLOC_FL_KEEP_SIZE constant i32

Value: 1

FALLOC_FL_PUNCH_HOLE constant i32

Value: 2

FALLOC_FL_ZERO_RANGE constant i32

Value: 16