79758162

Date: 2025-09-07 14:05:40
Score: 0.5
Natty:
Report link

One way to do this is to use import.meta.url and convert the file:// URI into a path-like string:

let uri = GLib.Uri.parse(import.meta.url, GLib.UriFlags.NONE);
let fpath = uri.get_path();

print(`${fpath}`);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: scrutari