writeBytes

suspend fun writeBytes(path: String, data: ByteArray, overwrite: Boolean = true)

Writes a ByteArray to a file.

Parameters

overwrite

If true, overwrites an existing file (FILE_OVERWRITE_IF); if false, fails if the file already exists (FILE_CREATE).