seek(within:from:region:context:replyHandler:)
Find the next offset of hole or data region greater than or equal to the supplied offset
Declaration
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 -> FSSeekRegionResultParameters
- 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 containing the offset of the requested region greater than or equal to the supplied offset, along with a
nilerror. If seek fails, pass the relevant error as the second parameter; FSKit ignores the Fsseekregionresult instance in this case. For anasyncSwift implementation, there’s no reply handler; simply return the result instance or throw an error.