Gio.resources_open_stream

function resources_open_stream(path: String, lookup_flags: Gio.ResourceLookupFlags): Gio.InputStream {
    // Gjs wrapper for g_resources_open_stream()
}
  

Looks for a file at the specified path in the set of globally registered resources and returns a Gio.InputStream that lets you read the data.

lookup_flags controls the behaviour of the lookup.

Since 2.32

path

A pathname inside the resource

lookup_flags

A Gio.ResourceLookupFlags

Returns

Gio.InputStream or null on error. Free the returned object with GObject.Object.prototype.unref