[Project_owners] Locating path of files after XPI installation

Pete Collins pete at mozdev.org
Sun Nov 16 11:12:38 EST 2003


> After a user has installed a XPI add-on... is it possible to get the
> path on disk where the package has been installed to ?


I know I sound like a broken record, but using jslib:

chromeToPath(aPath);

   http://jslib.mozdev.org/libraries/io/fileutils.js.html

eg:

js> include (jslib_fileutils);
chrome://jslib/content/io/fileUtils.js
*** load: fileUtils.js OK
0
js> var fu = new FileUtils();
js> fu.chromeToPath("chrome://messenger/content/");
resource:/backups/lindows/mozilla/dist/bin/chrome/messenger.jar!/content/messenger/messenger.xul


--pete

-- 
Pete Collins
www.mozdev.org
www.mozdevgroup.com




More information about the Project_owners mailing list