应用程序日志文件和用户生成的数据文件是否应该存储在 APPDATA 或 PROGRAMDATA 中
我们正在将我们的APP迁移到Win7。该程序生成日志文件来帮助我们提供支持,并保存许多对用户有用的字典文件和设置文件,尽管用户很少真正想要与我们的应用程序之外的文件进行交互。但它们可以,因为它们是 csv 文件。我使用 APPDATA\LOCAL\OURAPPLICATION 文件夹作为目标构建了第一次运行。现在我想知道它是否应该是 PROGRAMDATA\OURAPPLICATION。
我实际上认为第一个选择更好,因为我扫描的所有内容似乎都表明 PROGRAMDATA 文件夹应该被认为是用户不可触及的,但由于我不是程序员,我不确定。
我希望这是问这个问题的正确地方
We are migrating our APP to Win7. The program generates log files to help us support and also saves a number of dictionary files and settings files that are useful for the user though the user will rarely if ever actually want to interact with the files outside of our application. They can though because they are csv files. I built the first run through with using the APPDATA\LOCAL\OURAPPLICATION folder as the destination. Now I am wondering if it should be PROGRAMDATA\OURAPPLICATION.
I actually think the first choice is better because it seems that everything I have scanned suggests that the PROGRAMDATA folder should be considered untouchable by the user but as I am not a programmer I am not sure.
I hope this is the right place to ask this question
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要考虑的关键点是数据的范围。如果您要存储与特定用户关联的数据,那么您应该使用 APPDATA;如果您要存储程序的全局数据,那么您应该使用 PROGRAMDATA。
APPDATA 和 PROGRAMDATA 都是隐藏文件夹,因此目的是让用户不要在其中闲逛(并不是说如果他们愿意就不能这样做)。
The key point to consider is what the scope of the data is. If you are storing data that is associated with a specific user then you should use APPDATA and if you are storing data that is global to your program then you should use PROGRAMDATA.
Both APPDATA and PROGRAMDATA are hidden folders so the intent is for users not to be poking around in there (not that they couldn't if they wanted to).