createFileFromByteArray

expect fun createFileFromByteArray(data: ByteArray, fileName: String): String

Creates a local model file from the given LiteRT model bytes and returns its absolute filesystem path.

This function is intended for platforms or APIs that require a model to be loaded from a file instead of directly from an in-memory byte array.

Return

The absolute path of the created model file.

Parameters

data

The binary content of the LiteRT model.

fileName

The name of the file to create, including its extension (for example, model.tflite).

Throws

If the file cannot be created or written.