[Jslib] What to use to open files in the chrome jar?
pete at mozdevgroup.com
Fri Dec 17 11:11:07 EST 2004
> This is because the file is now encapsulated in a jar file (did I
> mention this is firefox).
Yes chromeToPath is broken for recent versions of Firefox only. Still
works fine in Mozilla builds.
See jslib bug 7959:
> The basic question is...
> What is the appropriate way to get an file handle to this file?
We need to implement a Chrome class or just provide support for opening
chrome URL's. Once a file is in a jar, it is no longer a "local" file.
It can be done, I just can't think of an *easy* way to do it off the top
of my head ...
Heres the *long* way to do it:
Example uses [chrome://jslib/content/jslib.xul]
js> var ios =
js> var uri = ios.newURI("chrome://jslib/content/jslib.xul",null,null);
jjs> var channel = ios.newChannelFromURI(uri);
jjs> var is =
I'll file a bug and get this type of functionality in as soon as I can ...
Pete Collins - Founder, Mozdev Group Inc.
Mozilla Software Development Solutions
More information about the Jslib