Package: gio

Function gio:resource-new-from-data

Lambda List

gio:resource-new-from-data (data)

Arguments

data -- a g:bytes instance for the data

Return Value

The new g:resource instance, or nil on error.

Details

Creates a g:resource instance 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 data is empty or corrupt, nil will be returned.

If you want to use this resource in the global resource namespace you need to register it with the g:resources-register function.
 

See also

2025-05-01