<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSPreallocateResult/init(bytesAllocated:itemAttributes:freeSpace:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(cs)FSPreallocateResult(im)initWithBytesAllocated:itemAttributes:freeSpace:"
  },
  "title" : "init(bytesAllocated:itemAttributes:freeSpace:)"
}
-->

# init(bytesAllocated:itemAttributes:freeSpace:)

Creates a result for a preallocate operation.

```
init?(bytesAllocated: Int, itemAttributes attributes: FSItem.Attributes, freeSpace: FSFreeSpace?)
```

## Parameters

`bytesAllocated`

The number of bytes actually allocated for the file during the preallocation operation.

`attributes`

The updated [`FSItem.Attributes`](/documentation/FSKit/FSItem/Attributes) of the file after the preallocation operation.

`freeSpace`

An [`FSFreeSpace`](/documentation/FSKit/FSFreeSpace) instance populated with the volume’s updated free space. Passing a `nil` free space causes FSKit to calculate the free space when the operation is done, based on the volume’s [`volumeStatistics`](/documentation/FSKit/FSVolume/Handler/volumeStatistics) property. This behavior may lead to degraded performance.

## Return Value

A populated result instance, or `nil` if validation fails.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)