load


Description:

public abstract Object load (string resource_name) throws Error

Load a resource from persistent storage.

The loaded resource will be of the same GType as when it was stored (provided that the same serialization and parse functions are registered).

In case of an error the error will be in the FileError domain. Specifically if there is no resource with the name resource_name the error code will be NOENT.

Important note: This call may do blocking IO. The resource manager must guarantee that this call is reasonably fast, like writing the externalized resource to a file, but not blocking IO over a network socket.

Parameters:

this

The resource manager to invoke

resource_name

The name of the resource to retrieve

Returns:

A newly allocated Object in case of success and null otherwise. In case of a runtime error the error pointer will be set.