[英]How to create files in working folder on Windows 10 UWP
We have a Universal Windows 10 Platform (UWP) application containing an unmodifiable C library which creates web files in its working folder. 我们有一个通用Windows 10平台(UWP)应用程序,其中包含一个不可修改的C库,该库在其工作文件夹中创建Web文件。 These web files are then loaded by the WebView object for display. 然后,这些Web文件由WebView对象加载以显示。 This architecture is working fine on other platforms, but it fails on UWP due to a lack of write access to the working folder. 该体系结构在其他平台上运行良好,但是由于缺少对工作文件夹的写访问权,因此在UWP上失败。 Apparently in a UWP app the working folder has special ACL protections which prevent creating files. 显然,在UWP应用中,工作文件夹具有特殊的ACL保护,可防止创建文件。 Is there a way to create a UWP app which is permitted to create new files in its own working folder? 有没有一种方法可以创建允许在其自己的工作文件夹中创建新文件的UWP应用?
Note, we have tried using a different folder but in those cases the WebView object either will not load a file at all or does not load associated xsl, css, etc files. 注意,我们尝试使用其他文件夹,但是在这种情况下,WebView对象要么根本不会加载文件,要么不会加载关联的xsl,css等文件。 Very frustrating. 非常沮丧。
Cheers, Bill :-) 干杯,比尔:-)
There is no way to write to the installation folder. 无法写入安装文件夹。 This is by design to ensure seamless differential updates and clean uninstall of apps. 这是设计使然,可确保无缝差异更新和应用程序的干净卸载。
Have you tried setting the current working directory (to local appdata for example) before using the component? 在使用组件之前,您是否尝试过设置当前工作目录(例如,设置为本地appdata)?
Thanks, Stefan Wick - Windows Developer Platform 谢谢,Stefan Wick-Windows开发人员平台
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.