readBytes

Gets the entire content of this file as a byte array.

It's not recommended to use this function on huge files. It has an internal limitation of approximately 2 GB byte array size. For reading large files or files of unknown size, open an InputStream and read blocks sequentially.

Since Kotlin

1.5

Return

the entire content of this file as a byte array.