<!--
{
  "availability" : [
    "macOS: 15.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSMetadataRange",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(cs)FSMetadataRange"
  },
  "title" : "FSMetadataRange"
}
-->

# FSMetadataRange

A range that describes contiguous metadata segments on disk.

```
class FSMetadataRange
```

## Overview

This type represents a range that begins at `startOffset` and ends at `startOffset + segmentLength * segmentCount`.
Each segment in the range represents a single block in the resource’s buffer cache.

For example, given an `FSMetadataRange` with the following properties:

- `startOffset = 0`
- `segmentLength = 512`
- `segmentCount = 8`

The range represents eight segments: from 0 to 511, then from 512 to 1023, and so on until a final segment of 3584 to 4095.

Ensure that each metadata segment represents a range that’s already present in the resource’s buffer cache.
Similarly, ensure that each segment’s offset and length matches the offset and length of the corresponding block in the buffer cache.

## Topics

### Creating a metadata range

[`init(offset:segmentLength:segmentCount:)`](/documentation/FSKit/FSMetadataRange/init(offset:segmentLength:segmentCount:))

Initializes a metadata range with the given properties.

[`rangeWithOffset:segmentLength:segmentCount:`](/documentation/FSKit/FSMetadataRange/rangeWithOffset:segmentLength:segmentCount:)

Creates a metadata range with the given properties.

### Accessing range properties

[`startOffset`](/documentation/FSKit/FSMetadataRange/startOffset)

The start offset of the range in bytes.

[`segmentLength`](/documentation/FSKit/FSMetadataRange/segmentLength)

The segment length in bytes.

[`segmentCount`](/documentation/FSKit/FSMetadataRange/segmentCount)

The number of segments in the range.



---

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)