问题描述
我的应用会创建应该为用户保留的文件。
My app creates files that should be persisted for the user.
我宁愿不要求用户必须命名和保存文件,而是自动执行,因为文件可以从它们被获取的日期和时间以及它们中包含的一些内容来描述。
I'd rather not ask the user to have to name and save files, rather do it automatically, as the files can be described from the date and time they were acquired and some of the content contained in them.
目前,我将数据存储在ApplicationData.Current.LocalFolder中,但是我遇到了一些问题。
Currently, I'm storing the data in ApplicationData.Current.LocalFolder, but I'm having a couple of problems.
首先,数据似乎完全没有明显消失。 我不确定这是因为我做了重建,还是由其他原因引起的。
First, the data seems to disappear completely for no apparent reason. I'm not sure if this is because I've done a rebuild, or if it's caused by something else.
其次,我想为用户提供以前打开的选项。文件 但是,存储我选择的文件似乎会使文件选择器无法访问这些文件。 我是否必须实现自己的UI来选择文件?
Second, I'd like to offer the user the option to open previous files. However, storing files where I have chosen appears to make them inaccessible to the file picker. Do I have to implement my own UI for selecting files?
第三,我注意到ApplicationData似乎有一个全局版本号,我不知道这应该如何应用于现有文件版本不匹配。 我可以开始转换,但是用户显然可以通过随时关闭应用来锁定转换
,所以我不确定如何保证不丢失数据。
Third, I notice ApplicationData seems to have a global version number, and I'm not sure how this should apply to existing files if the versions don't match. I could begin the conversion, but the user could obviously pull the plug on the conversion by closing the app at any moment, so I'm not sure how I can guarantee not to lose the data.
是否有关于如何处理此文档的文档的指示,因为我找不到。
Are there any pointers to the documentation on how this should be handled, as I can't find any.
Anthony Wieser |维瑟软件有限公司|
Anthony Wieser | Wieser Software Ltd | www.wieser-software.com
推荐答案
这篇关于我应该在哪里存储我的应用程序的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!