Resource.load

gio.resource.Resource load(string filename)

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 gio.resource.Resource.Register.

If filename is empty or the data in it is corrupt, gio.types.ResourceError.Internal will be returned. If filename doesn’t exist, or there is an error in reading it, an error from glib.mapped_file.MappedFile.new_ will be returned.

Parameters

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

Returns

a new #GResource, or null on error

Throws