Firefox加载项保存到桌面

Firefox加载项保存到桌面,firefox,firefox-addon,mozilla,Firefox,Firefox Addon,Mozilla,我正在尝试将文件保存在扩展名文件夹以外的文件夹中。现在我正在使用: var file = Components.classes["@mozilla.org/file/directory_service;1"]. getService(Components.interfaces.nsIProperties). get("ProfD", Components.interfaces.nsIFil

我正在尝试将文件保存在扩展名文件夹以外的文件夹中。现在我正在使用:

var file = Components.classes["@mozilla.org/file/directory_service;1"].  
                         getService(Components.interfaces.nsIProperties).  
                         get("ProfD", Components.interfaces.nsIFile);  
    if( !file.exists() || !file.isDirectory() ) {   // if it doesn't exist, create  
       file.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);  
    }  

this.f = file.path+"\\text.txt";
如何更改文件路径,使其保存在计算机上的其他位置?或者这是不可能的

谢谢

您也可以使用不同的“特殊文件夹”键。有关一些常见问题的列表,请参见:

您还可以使用任何绝对路径初始化文件。请参阅: