---
title: FSVolume.PreallocateOperations
framework: fskit
role: symbol
role_heading: Protocol
path: fskit/fsvolume/preallocateoperations
---

# FSVolume.PreallocateOperations

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

## Declaration

```swift
protocol PreallocateOperations : NSObjectProtocol
```

## Overview

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). note: Use FSVolume.PreallocateHandler instead.

## Topics

### Preallocating space

- [FSVolume.PreallocateFlags](fskit/fsvolume/preallocateflags.md)

### Inspecting volume properties

- [isPreallocateInhibited](fskit/fsvolume/preallocateoperations/ispreallocateinhibited.md)

### Instance Methods

- [preallocateSpace(for:at:length:flags:replyHandler:)](fskit/fsvolume/preallocateoperations/preallocatespace(for:at:length:flags:replyhandler:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Deprecated

- [FSVolume.Operations](fskit/fsvolume/operations.md)
- [FSVolume.OpenCloseOperations](fskit/fsvolume/opencloseoperations.md)
- [FSVolume.ReadWriteOperations](fskit/fsvolume/readwriteoperations.md)
- [FSVolume.AccessCheckOperations](fskit/fsvolume/accesscheckoperations.md)
- [FSVolume.RenameOperations](fskit/fsvolume/renameoperations.md)
- [FSVolume.XattrOperations](fskit/fsvolume/xattroperations.md)
- [FSVolume.ItemDeactivation](fskit/fsvolume/itemdeactivation.md)
- [FSVolumeKernelOffloadedIOOperations](fskit/fsvolumekerneloffloadediooperations.md)
