punchHole method

void punchHole(
  1. int offset,
  2. int length
)

Deallocates [offset, offset + length) without writing zeros.

Windows: FSCTL_SET_ZERO_DATA; Linux/Android: fallocate(PUNCH_HOLE). Unsupported platforms throw UnsupportedError; callers can fall back to zeroize.

Implementation

void punchHole(int offset, int length) =>
    throw UnsupportedError('punchHole is not supported on this platform');