read(length:from:completionHandler:)
Reads bytes from a byte source into a data object.
Declaration
func read(length: Int, from offset: Int64, completionHandler: @escaping @Sendable (Data?, (any Error)?) -> Void)func read(length: Int, from offset: Int64) async throws -> DataParameters
- length:
The number of bytes to read.
- offset:
The relative offset in bytes from the beginning of the file from which to start reading.
- completionHandler:
The completion block to execute when the read operation finishes.