[Jslib] reading files in a .jar archive

David VANTYGHEM david.vantyghem at free.fr
Sun Aug 1 08:46:51 PDT 2010


I use the readDir() function in an .XPI firefox extension. With
readDir(), I read data files that are in my .XPI extension.

I can't install my .XPI extension in Firefox if I don't zip the
extension content/, locale/ and skin/ directories into a .jar file.
Then, readDir() can't anymore read the data files that are in the .jar.
readDir() doesn't understand "...compilibre.jar!/content..." :
> var test_files = new Dir(/home/david/.mozilla/firefox/p36rvo6y.default/extensions/{d0c46cc6-1d37-c2f9-9939-0d7c99a8207e}/chrome/compilibre.jar!/content/data/50/documentation)
> if(test_files.readDir().length < 0) ========> doesn't work!!!

How could I read data into a jar file?

More information about the Jslib mailing list