我正在开发一个需要在本地存储之外创建文件的UWP应用程序。我使用文件夹选择器让用户选择输出控制器,然后我使用LocalSettings
存储该选择并将文件夹添加到FutureAccessList
。
然后,我使用StorageFile.CreateFileAsync
来创建文件(这是成功的,没有错误或例外)。
问题是,文件是使用阻塞创建的,您可以在文件属性对话框中看到:
是否有一种特定的方法来创建没有这个的文件,或者使用C#解锁?
我想在这里分享我的一些发现:
IDictionary<string, object> extraProperties = await file.Properties.RetrievePropertiesAsync(propertiesName);
var propValue = extraProperties[appzoneProperty];
if (propValue != null)
{
fileProperties.AppendLine("appzone property: " + propValue);
}
我总是得到空值。根据我的理解,这可能与许可有关。