Instance Method (Default implementation)swift-nio 2.84.0_NIOFileSystem

readChunks(in:chunkLength:)

Returns an asynchronous sequence of chunks read from the file.

FileHandleProtocol.swift:245
iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
func readChunks(in range: PartialRangeFrom<Int64>, chunkLength: ByteCount = .kibibytes(128)) -> FileChunks

Parameters

range

A range of offsets in the file to read.

chunkLength

The length of chunks to read, defaults to 128 KiB.

Returns

An AsyncSequence of chunks read from the file.