Contents

FSVolume.PreallocateOperations

Methods and properties implemented by volumes that want to offer preallocation functions.

Declaration

protocol PreallocateOperations : NSObjectProtocol

Overview

A preallocation operation allocates space for a file without writing to it yet. A file system may use reallocation to avoid performing space allocation while in the midst of I/O; this strategy improves performance. Also, if the expected I/O pattern is many small writes, preallocating contiguous chunks may prevent fragmenting the file system. This process can improve performance later.

In a kernel-based file system, you typically preallocate space with the VNOP_ALLOCATE operation, called from fcntl(F_PREALLOCATE).

Topics

Preallocating space

Inspecting volume properties

See Also

Implementing optional operations