readFile

abstract fun readFile(    bypassFileManager: Boolean,     reference: ResolverReference,     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.

reference

The ResolverReference that identifies the target file to read.

withContents

A function that accepts the raw bytes of the file in the moduleRoot and optionally a FileManager file UUID or null if bypassFileManager is true.

failureHandler

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