saveFile

abstract suspend fun saveFile(filePath: String, data: Flow<ByteArray>): Long

Saves a source of data bytes to a path.

Return

The byte size of the saved file.

Parameters

filePath

The path where the file will be saved.

data

A Flow of ByteArray representing the file data.

Throws

If an error occurs during the save operation.

If the operation is cancelled.