Open files in a folder in data

After some debugging on the matrix channels:

  1. First, the files that were in data/extensions/ should instead be in a data folder - so, not accessed directly through the project’s path.
  2. To do so, I added a line in the meson.build file under data/ - The path is relative to the meson file, and install_dir is required. - This will add the files in either .var/app/ or wherever your flatpaks are. Particularly, in the data folder.
install_subdir('extensions', install_dir: get_option('datadir'))
  1. Then, we can access it by getting the folder at /app/share/extensions/ with Gio
Gio.File.new_for_path("/app/share/collections")

And then, to get the files, it’s something to do with gio.enumerate_children.