writeFlow

suspend fun AsynchronousFileChannel.writeFlow(start: Long, content: Flow<ByteArray>)

Writes the content of a Flow of ByteArrays to this AsynchronousFileChannel starting at the specified start position.

Parameters

start

The position in the file at which the writing starts.

content

The Flow of ByteArrays to be written to the channel.

Example usage:

val channel: AsynchronousFileChannel = ...
val byteArrayFlow: Flow<ByteArray> = ...
channel.writeFlow(0, byteArrayFlow)