If I run my application with firefox --app
the first time it seems a new profile is created. I got the location of this profile with:
var file = Components.classes["@mozilla.org/file/directory_service;1"].
getService(Components.interfaces.nsIProperties).
get("ProfD", Components.interfaces.nsIFile);
alert(file.path);
Then I went to my firefox profile /home/me/.mozilla/firefox/82xw54jj.default/ and copied the extensions directory in the profile directory of my application. Now I can use jslib like so:
Components.utils.import("resource://gre/modules/FileUtils.jsm");
file = new FileUtils.File("/home");
alert(file);