read
open fun read(path: String, amount: Long = 0, offset: Long = 0, readAll: Boolean = false): ByteArray
Read bytes from a file at path.
Return
the bytes read from the file
Parameters
path
fully qualified path of the file to read
amount
number of bytes to read (ignored when readAll is true)
offset
byte offset to start reading from (ignored when readAll is true)
readAll
if true, reads the entire file contents
Throws
FileNotFoundException
if the file does not exist