rem: var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties); var dir = fileLocator.get(this._getSpecialFolderKey(aFolder), Components.interfaces.nsILocalFile); if (aFolder != "Desktop") dir.append("My Downloads");  return dir; 
add: switch(aFolder) { case "Desktop": var fileLoc = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties); return fileLoc.get("Desk", Components.interfaces.nsILocalFile); break; case "Downloads": var dnldMgr = Components.classes["@mozilla.org/download-manager;1"] .getService(Components.interfaces.nsIDownloadManager); return dnldMgr.defaultDownloadsDirectory; break; } throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'"; 
context:   _getDownloadsFolder: function (aFolder)  {    var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]                                .getService(Components.interfaces.nsIProperties);    var dir = fileLocator.get(this._getSpecialFolderKey(aFolder),                              Components.interfaces.nsILocalFile);    if (aFolder != "Desktop")      dir.append("My Downloads"); // XXX l12y!    return dir;  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/30d7fb302b33509f0f45e76ebb30d74f3301cc5f/main.js/clean/browser/components/preferences/main.js