readBytes

abstract suspend fun readBytes(path: Path): ByteArray(source)

Reads the content of a file at the specified path.

Return

The file content as a byte array.

Parameters

path

The path to read.

See also

Throws

if the path doesn't exist or isn't a regular file.

IOException

if an I/O error occurs during reading.