简体   繁体   English

如何在Windows 10 UWP上的工作文件夹中创建文件

[英]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.

相关问题 GridView的重新排序在Windows 10 UWP中不起作用 - Reorder of GridView is not working in windows 10 UWP Windows 10现代版应用程序或UWP应用程序数据文件夹 - Windows 10 modern app or UWP app data folder 在Windows 10上,授予用户创建,编辑和删除文件夹C:\\ VMs中的文件的权限,但禁止删除文件夹本身 - On Windows 10, grant a user rights to create, edit and delete files in the folder C:\VMs, but prevent deletion of the folder itself Windows 10 IoT上的UWP - UWP on windows 10 IoT UWP-App创建的文件未在Windows 10 1803中编制索引 - UWP-App created files not indexed in Windows 10 1803 如何使用 windows 10 中的另一个文件夹扩展文件夹,以使两个文件夹中的所有文件都可以从一个路径访问? - How to extend folder with another folder in windows 10, in such way that all files in both folders are accessible from one path? 如何将我的工作文件夹设置为项目中的根文件夹(Windows 10) - How can I set my working folder as a root folder in my project (Windows 10) Windows 7 vs Windows 10-处理批处理文件中带有空格的文件夹名称 - Windows 7 vs Windows 10 - Handling folder names with spaces in batch files Windows 10 UWP更新任务 - Windows 10 UWP Update Task 如何在 uwp 中退出 Windows 10 程序? - how to sign out from windows 10 program in uwp?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM