<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSVolume/SeekRegionHandler/seek(within:from:region:context:replyHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(pl)FSVolumeSeekRegionHandler(im)seekWithinItem:fromOffset:region:context:replyHandler:"
  },
  "title" : "seek(within:from:region:context:replyHandler:)"
}
-->

# seek(within:from:region:context:replyHandler:)

Find the next offset of hole or data region greater than or equal to the
supplied offset

```
func seek(within item: FSItem, from offset: off_t, region: FSVolume.SeekRegion, context: FSContext, replyHandler reply: @escaping @Sendable (FSSeekRegionResult?, (any Error)?) -> Void)
```

```
func seek(within item: FSItem, from offset: off_t, region: FSVolume.SeekRegion, context: FSContext) async throws -> FSSeekRegionResult
```

## Parameters

`item`

The item for which to seek.

`offset`

The offset from which to seek.

`region`

The region to seek.

`context`

An object that enables context-aware file system decisions throughout the operation.

`reply`

A block or closure to indicate success or failure. If seek succeeds, pass an instance of [`FSSeekRegionResult`](/documentation/FSKit/FSSeekRegionResult) containing the offset of the requested region greater than or equal to the supplied offset, along with a `nil` error. If seek fails, pass the relevant error as the second parameter; FSKit ignores the [`FSSeekRegionResult`](/documentation/FSKit/FSSeekRegionResult) instance in this case. For an `async` Swift implementation, there’s no reply handler; simply return the result instance or throw an error.

---

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)