readLitertlmModelTypes function
The model_type of every TFLiteModel section of path, lowercased (as
LiteRT-LM compares them), in file order. A section without one is left
out.
Throws FileSystemException when the file cannot be read and
FormatException when it is not a .litertlm container this reader
understands.
Implementation
List<String> readLitertlmModelTypes(String path) {
final file = File(path).openSync();
try {
final headerEnd = litertlmHeaderEnd(_readExactly(file, 0, 32));
return litertlmModelTypes(_readExactly(file, 32, headerEnd - 32));
} finally {
file.closeSync();
}
}