在Windows RT中以编程方式访问隐藏文件? [英] Access a hidden file programatically in Windows RT?

查看:78
本文介绍了在Windows RT中以编程方式访问隐藏文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有没有办法在Windows RT中以编程方式访问隐藏文件?



每当我尝试为隐藏文件执行GetFileAsync时,我都会收到UnauthorizedAccessException。 / p>

解决方案

不允许从WinRT API访问系统和隐藏文件,即使这些文件位于应用程序文件夹中也是如此。尽管没有必要对应用程序文件夹这样做,但是出于一致性原因这样做了。想象一下,你有相同的代码
适用于appdata文件夹,但不知何故无法枚举"相机卷"下的隐藏文件。文件夹中。

Is there any way to access hidden files programatically in Windows RT?

Whenever I try to do GetFileAsync for a hidden file, I get UnauthorizedAccessException.

解决方案

It's not allowed to access both System and Hidden files from the WinRT APIs, even if those files are in the application folder. In spite it's not necessary to do so for application folders, it's done for consistency reasons. Imagine you have the same code that works fine for appdata folders, but somehow fails to enumerate hidden files under the "Camera Roll" folder.


这篇关于在Windows RT中以编程方式访问隐藏文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆