MCPcopy Create free account
hub / github.com/GNOME/gjs / loadResource

Function loadResource

modules/script/package.js:115–121  ·  view source on GitHub ↗
(path, baseName)

Source from the content-addressed store, hash-verified

113 let libpath, girpath;
114
115 const loadResource = (path, baseName) => {
116 const resource = Gio.Resource.load(GLib.build_filenamev([path,
117 `${baseName}.src.gresource`]));
118 resource._register();
119
120 return `resource:///${baseName.replaceAll('.', '/')}/js`;
121 };
122
123 if (_runningFromMesonSource()) {
124 log('Running from Meson, using local files');

Callers 1

initFunction · 0.85

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected