DirectoryInfo的,FileInfo的和很长的路 [英] DirectoryInfo, FileInfo and very long path
问题描述
我努力工作,DirectoryInfo的,FileInfo的很长的道路。
I try to work with DirectoryInfo, FileInfo with very long path.
- 在我尝试使用\\ \ C:\长的路径(我得到的非法卡拉科特用的fileInfo和DirectoryInfo的)
- 在我尝试使用file:// C:/长径(GOT URI不支持我)
我可以使用〜在路径或别的东西。
Can i use ~ in a path or something else.
我读这帖子,但我想使用调用API的另一种方式。这是任何其他的解决方案?
I read this post but i would like to use another way that call a API. Is it any other solutions ?
目前使用的是Microsoft的文章\\?在文件路径链接文本
There is an article from microsoft for use \\? in file path link text
现在的问题是我怎么能工作具有非常长的路径和DirectoryInfo的,以及为的FileInfo路径谁更有时间越长,256字符
The question is how can i work with very long path, and DirectoryInfo, and FileInfo for path who are more longer that 256 char
推荐答案
纵观<一href="http://blogs.msdn.com/bclteam/archive/2007/02/13/long-paths-in-net-part-1-of-3-kim-hamilton.aspx">Long在.NET <一个路径href="http://blogs.msdn.com/bclteam/archive/2007/03/26/long-paths-in-net-part-2-of-3-long-path-workarounds-kim-hamilton.aspx">blog帖子 <一href="http://blogs.msdn.com/bclteam/archive/2008/07/07/long-paths-in-net-part-3-of-3-redux-kim-hamilton.aspx">series,它看起来像到P要在Win32 API / Invoke的是目前唯一的解决方案,比调整您的目录,这样你不打的极限等。
Looking at the Long Paths in .NET blog post series, it looks like going to the Win32 API through P/Invoke is the only solution at the moment, other than restructuring your directories so that you don't hit the limit.
这篇关于DirectoryInfo的,FileInfo的和很长的路的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!