load

fun load(filename: String): <Error class: unknown class><Resource>

Loads a binary resource bundle and creates a #GResource representation of it, allowing you to query it for data.

If you want to use this resource in the global resource namespace you need to register it with g_resources_register().

If @filename is empty or the data in it is corrupt, %G_RESOURCE_ERROR_INTERNAL will be returned. If @filename doesn’t exist, or there is an error in reading it, an error from g_mapped_file_new() will be returned.

Return

a new #GResource, or null on error

Since

2.32

Parameters

filename

the path of a filename to load, in the GLib filename encoding