appendTo
suspend fun Flow<ByteArray>.appendTo(file: Path, vararg options: OpenOption = arrayOf(
StandardOpenOption.WRITE,
StandardOpenOption.CREATE
))
Appends the content of this Flow of ByteArrays to the specified file.
Parameters
file
The file path to append to.
options
The options specifying how the file is opened. Defaults to StandardOpenOption.WRITE and StandardOpenOption.CREATE.
Example usage:
val file: Path = ...
val byteArrayFlow: Flow<ByteArray> = ...
byteArrayFlow.appendTo(file)
Content copied to clipboard