Gio.Resource.new_from_data
function new_from_data(data: ByteArray): Gio.Resource {
// Gjs wrapper for g_resource_new_from_data()
}
Creates a GResource from a reference to the binary resource bundle. This will keep a reference to data while the resource lives, so the data should not be modified or freed.
If you want to use this resource in the global resource namespace you need to register it with Gio.resources_register.
Since 2.32
- data
- Returns
a new Gio.Resource, or null on error