Changes

Jump to: navigation, search

User:Jamesboston/nsIProcess/meeting-112308

492 bytes added, 01:47, 27 November 2008
no edit summary
Topic : Pathnames and starting binaries from xpcshell<br />
Note:<br>
I've discovered that this bit of code will return the full directory path that contains xpcshell:
var file = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get("CurProcD", Components.interfaces.nsIFile);
 
ie. print(file.path) will return /home/james/mozilla/obj-ff/dist/bin
 
However, I have not yet determined how reliable this is. According to devmo, this "usually" works.
{|

Navigation menu