readFileBytes

fun readFileBytes(bypassFileManager: Boolean, withContents: (ByteArray, UUID?) -> Unit, failureHandler: (ErrorCode, Throwable?) -> Unit)

Retrieve the resource and provide it with a request to obtain the raw file bytes.

Parameters

bypassFileManager

true indicates the file should be read directly from the source location; false indicates an attempt to read from the FileManager should be made.

withContents

A function that accepts the raw bytes of the read file.

failureHandler

A function that accepts a ErrorCode that describes the nature of the failure and a nullable Throwable.