[UWP]解决使用Javascript访问最新Windows 10版本中的文件/文件夹的长路径(& gt; 260 char)限制 [英] [UWP]Resolving long path (>260 char) limitation for accessing files/folders in latest Windows 10 build using Javascript

查看:37
本文介绍了[UWP]解决使用Javascript访问最新Windows 10版本中的文件/文件夹的长路径(& gt; 260 char)限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我正在构建一个cordova Windows应用程序,并且从我的应用程序访问文件和文件夹时出错,因为窗口限制,路径长度超过260个字符。对于访问或创建新文件和文件夹,目前,
我正在使用Windows(Runtime)API的Windows.Storage命名空间用于Javascript,其功能包括createFolderAsync,getFolderAsync,  getFileFromPathAsync等。 

I am building a cordova windows application and get an error in accessing files and folders from my application that have path lengths greater than 260 characters because of the windows limitation. For accessing or creating new files and folders, currently, I am using Windows.Storage namespace of Windows (Runtime) API for Javascript with functions such as createFolderAsync, getFolderAsync, getFileFromPathAsync etc. 

最近,我听说最新版本的Windows 10已经删除了文件/文件夹路径的260个字符限制。 (链接:https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396#maxpath)但是
这仅适用于C ++中可用的某些特定Win32函数,要在我的应用程序中调用它们,我需要在C ++中创建一个Windows运行时组件。 (1)有没有办法,我可以利用最新的Windows 10版本
(版本1607)中的最新更改来直接创建/访问路径长度为>的文件和文件夹。 260个字符? (2)这个限制是否仍然存在于javascript Windows库中,我们真的别无选择,只能涉及win32 C ++ API来解决这个问题吗?
(3)Windows是否考虑将来从所有其他图书馆中删除此限制?

Recently, I heard that the latest build of Windows 10 has removed the 260 character limit for paths of files/folders. (link: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396#maxpath) But this is only available in some particular Win32 functions available in C++, and to call them in my app, I need to make a Windows Runtime component in C++. (1) Is there a way, I can leverage the latest changes in the latest Windows 10 build (version 1607) to directly create/access files and folders with path lengths > 260 chars? (2) Is this limitation still there in the javascript Windows libraries and do we really have no option but to involve win32 C++ APIs to do away with this problem? (3) Is windows considering to remove this limitation from all other libraries as well in the future?

提前致谢!

推荐答案

你好Varun Syal,

Hi Varun Syal,

>>有没有办法,我可以利用最新的Windows 10版本(版本1607)中的最新更改来直接创建/访问路径长度为>的文件和文件夹。 260个字符?

众所周知,没有办法直接创建/访问路径长度为>的文件和文件夹。 260个字符。

As I known, there is no way to directly create/access files and folders with path lengths > 260 chars.

>>这个限制是否仍存在于javascript Windows库中,我们真的别无选择,只能让win32 C ++ API消失有这个问题吗?

>>Is this limitation still there in the javascript Windows libraries and do we really have no option but to involve win32 C++ APIs to do away with this problem?

是的,javascript Windows库中仍有限制。

Yes, the limitation is still there in the javascript Windows libraries.

>> Windows是否考虑在将来从所有其他库中删除此限制?

>>Is windows considering to remove this limitation from all other libraries as well in the future?

很难说,如果Windows考虑从所有其他库中删除此限制,它将在文档中更新。



最好的问候,

Jayden Gu

It's hard to say, if the windows considering to remove this limitation from all other libraries, it will be update in the document.

Best Regards,
Jayden Gu


这篇关于[UWP]解决使用Javascript访问最新Windows 10版本中的文件/文件夹的长路径(& gt; 260 char)限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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