readBytes

suspend fun readBytes(path: String): ByteArray(source)

Reads the content of the resource file at the specified path and returns it as a byte array.

Example: val bytes = Res.readBytes("files/key.bin")

Return

The content of the file as a byte array.

Parameters

path

The path of the file to read in the compose resource's directory.