FileReaderFactory

Functions

Link copied to clipboard
fun fromManifest(manifest: ByteArray, baseFileReader: FileReader): FileReader

Creates a FileReader that reads files from memory. The manifest parameter is the content of the manifest file. The baseFileReader parameter is an optional FileReader that will be used to read files that are not the manifest. If baseFileReader is not specified, then an error will be returned when a file other than the manifest is read.

Link copied to clipboard
fun fromMemory(manifest: ByteArray, wasmModule: ByteArray, baseFileReader: FileReader? = null): FileReader

Creates a FileReader that reads files from memory. The manifest and wasmModule parameters are the content of the manifest and wasm module files respectively. The baseFileReader parameter is an optional FileReader that will be used to read files that are not the manifest or wasm module. If baseFileReader is not specified, then an error will be returned when a file other than the manifest or wasm module is read.

Link copied to clipboard
fun fromWasmModule(wasmModule: ByteArray, baseFileReader: FileReader): FileReader

Creates a FileReader that reads files from memory. The wasmModule parameter is the content of the wasm module file. The baseFileReader parameter is an optional FileReader that will be used to read files that are not the wasm module. If baseFileReader is not specified, then an error will be returned when a file other than the wasm module is read.