[UWP]在UNC共享上创建目录 [英] [UWP]Create Directory on a UNC share

查看:86
本文介绍了[UWP]在UNC共享上创建目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

有没有人知道如何使用UNC共享从UWP应用创建文件夹(目录)?

Does anyone know how to create a folder (directory) from a UWP app, using a UNC share?

我的应用程序将在


  • OneDrive
  • 本地硬盘

但我似乎无法让它在服务器上的共享上工作。我不需要打开文件,我的应用程序正在移动文件,所以我只需要能够创建文件夹和移动文件。

But I cannot seem to get it to work on a share on the server. I don't need to open the files, my app is moving files around, so I only need to be able to create folders and move files.

这是一个Windows 10应用程序,目前定位环球,但我很灵活,特别是现在移动看起来已经死了。

This is a Windows 10 app, currently targeting Universal, but I am flexible on that, particularly now that Mobile looks dead in the water.

任何帮助都会非常感激。

Any help would be much appreciated.

凯瑟琳

推荐答案

有关如何使用的信息,请参阅以下主题在UWP应用程序中访问网络驱动器:

Please refer to the following thread for information about how to access a network drive in a UWP app:

[UWP]访问网络驱动器上的文件?: HTTPS://社会。 msdn.microsoft.com/Forums/windowsapps/en-US/e822c960-f15d-4789-9ff2-040212d0a67c/uwpaccess-a-file-on-a-network-drive?forum=wpdevelop

您可能已经知道,纯UWP应用程序通常只允许访问和将文件写入特定文件夹。有关此内容的更多信息,请参阅以下页面:
$
https://msdn.microsoft.com/windows/uwp/files/file-access-permissions?f=255&MSPPError=-2147217396

http://stackoverflow.com/questions/33082835/windows-10-universal-app-file -directory-access

http://stackoverflow.com/questions/34071024/how-to-display-an-image-from-a-network-folder-or-local-驱动Windows-univer

As you may already know, a pure UWP app is in general only allowed to access and write files to specific folders. Please refer to the following pages for more information about this:
https://msdn.microsoft.com/windows/uwp/files/file-access-permissions?f=255&MSPPError=-2147217396
http://stackoverflow.com/questions/33082835/windows-10-universal-app-file-directory-access
http://stackoverflow.com/questions/34071024/how-to-display-an-image-from-a-network-folder-or-local-drive-in-a-windows-univer

>>这是一款Windows 10应用,目前针对的是Universal,但我对此非常灵活,尤其是现在,移动看起来已经死了。

我不确定什么是"灵活的"在这种情况下意味着如果您不关心到达除PC之外的任何其他设备并且您想要摆脱UWP强加的沙盒约束,您可以考虑切换到WPF。然后,您将访问完整的.NET Framework
,您的应用程序可以访问任何文件或文件夹,而无需用户明确确认。

I am not sure what "flexible" means in this case but if you don't care about reaching any other devices than PC and you want to get out of the sandbox constraint that the UWP imposes, you might consider switching to WPF. Then you will have access to the full .NET Framework and your app may access any files or folder without explicit confirmation from the user.

希望有所帮助。

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

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


这篇关于[UWP]在UNC共享上创建目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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