How to get XULRunner Application Directory

The Following code will give you the application directory of a xulrunner application
    var appPath = Components.classes["@mozilla.org/file/directory_service;1"]
            .getService(Components.interfaces.nsIProperties).get(
                    "resource:app", Components.interfaces.nsIFile).path;
    
You can more interesting file locations at MDC File IO