Open main menu

CDOT Wiki β

Changes

User:Jamesboston/nsIProcess/meeting-112308

493 bytes added, 04:48, 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.
{|