Search code examples
firefox-addonxpcom

nsIFile: How to get Vista AppData/LocalLow folder path?


I am able to get path to User 'AppData/Local' folder as follows, appdatafile = Components.classes["@mozilla.org/file/directory_service;1"]. getService(Components.interfaces.nsIProperties). get("LocalAppData", Components.interfaces.nsIFile).path;

Can anyone help me to get the 'AppData/LocalLow' user folder?


Solution

  • There is no named constant to get it, so you'd have to get AppData first (pass in AppData instead of LocalAppData), and append LocalLow on the object.

    You could/should also file a bug to request this constant.