【发布时间】:2011-12-14 04:17:45
【问题描述】:
我正在开发一个使用本地 .xml 文件的 Firefox 扩展程序,它可以读写它。
我的代码没有问题,它可以在我的电脑上使用桌面目录进行测试,但我不知道在最终扩展上使用哪个文件夹,因为它在尝试编写时可能会遇到权限问题一些电脑上的文件。
在 mozilla.org 上,我看到了可以使用的这些目录:
String Meaning
ProfD profile directory
DefProfRt user (for example /root/.mozilla)
UChrm %profile%/chrome
DefRt %installation%/defaults
PrfDef %installation%/defaults/pref
ProfDefNoLoc %installation%/defaults/profile
APlugns %installation%/plugins
AChrom %installation%/chrome
ComsD %installation%/components
CurProcD installation (usually)
Home OS root (for example /root)
TmpD OS tmp (for example /tmp)
ProfLD Local Settings on windows; where the network cache and fastload files are stored
resource:app application directory in a XULRunner app
Desk Desktop directory (for example ~/Desktop on Linux, C:\Documents and Settings\username\Desktop on Windows)
Progs User start menu programs directory (for example C:\Documents and Settings\username\Start Menu\Programs)
有人知道哪个是用于发布发布的最佳选择吗?我的意思是所有可用文件夹中的哪一个将始终在任何电脑上具有写入权限?
【问题讨论】:
标签: firefox firefox-addon firefox4