我们可以从系统更改默认下载映像位置吗? [英] Can we change the default download image location from the system?

查看:92
本文介绍了我们可以从系统更改默认下载映像位置吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  我们正在从azure下载图像并保存到"C:\ Users \Test \ AppData \ Local \Packages \ Location.w3ew39acqp9x0 \ LocalState" location,然后根据我们在localstate下创建文件夹的用户ID,然后存储图像,

   we are downloading images from azure and saving to "C:\Users\Test\AppData\Local\Packages\location.w3ew39acqp9x0\LocalState" location,then based on the user id we are creating folder under localstate then storing the images,

可以更改位置以将图像存储到应用程序的安装位置,因为用户能够看到图像,

is its possible to change the location to store images to where the app got installed,because the user able to see the images,

如果用户无法看到图像,可以将图像存储到某个安全文件夹。

its possible to store the images to some secure folder,if the user not able to see the image.

推荐答案

>>是否可以更改位置将图像存储到应用程序安装的位置,因为用户能够看到图像,

不,您无法在运行时写入安装目录。它是只读的:

http://stackoverflow.com/questions/10310510/copy-file-into-install-directory-of-metro-style-app

No, you cannot write to the installation directory at runtime. It is read-only: http://stackoverflow.com/questions/10310510/copy-file-into-install-directory-of-metro-style-app

>> ;如果用户无法看到图像,则可以将图像存储到某个安全文件夹中。

您应该将文件写入Local文件夹,Roaming文件夹或Temp文件夹。每个UWP应用程序都有这三个文件夹,因为它们是隔离的,所以它们非常安全。有关更多信息,请参阅Jerry Nixon的博客文章:

http://blog.jerrynixon.com/2012/06/windows-8-how-to-read-files-in-winrt.html

You should write files to the Local folder, the Roaming folder or the Temp folder. Every UWP app has these three folders and they are pretty secure since they are isolated. Please refer to Jerry Nixon's blog post for more information: http://blog.jerrynixon.com/2012/06/windows-8-how-to-read-files-in-winrt.html

如果要将文件保存到硬盘驱动器上的另一个文件夹,则需要明确要求用户使用选择器选择此文件夹:

https://msdn.microsoft.com/en-us/windows/uwp/files/quickstart-using文件和文件夹选择器

If you want to save the file to another folder on the hard drive you need explicitly ask the user to select this folder using a picker: https://msdn.microsoft.com/en-us/windows/uwp/files/quickstart-using-file-and-folder-pickers



希望有所帮助。


Hope that helps.

请记住通过将有用的帖子标记为答案来关闭您的主题,如果您有新问题,请启动新主题。请不要在同一个帖子中提出几个问题。

Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.


这篇关于我们可以从系统更改默认下载映像位置吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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