fn find_index_entry_by_path(start voidptr, path string) &EmbedFileIndexEntry
find_index_entry_by_path is used internally by the V compiler:
struct EmbedFileData {
path string
apath string
mut:
compressed byteptr
uncompressed byteptr
free_compressed bool
free_uncompressed bool
pub:
len int
}
https://github.com/vlang/rfcs/blob/master/embedding_resources.md EmbedFileData encapsulates functionality for the $embed_file()
compile time call.
fn (ed EmbedFileData) str() string
fn (mut ed EmbedFileData) free()
fn (mut ed EmbedFileData) data() byteptr
struct EmbedFileIndexEntry {
id int
path string
data byteptr
}
//////////////////////////////////////////////////////////////////////////// EmbedFileIndexEntry is used internally by the V compiler when you compile a program that uses $embed_file('file.bin') in -prod mode. V will generate a static index of all embedded files, and will call the find_index_entry_by_path over the index and the relative paths of the embeds. NB: these are public on purpose, to help -usecache.