<quote from="Mike">
It is a common misconception that the constant MAX_PATH refers to the 
maximum length of a Windows path.  It actually refers to the maximum 
length of a Windows path *component*, such as a filename or a folder name.
</quote>

This is incorrect.  The maximum length of a path component is 255.  See 
http://msdn2.microsoft.com/en-us/library/aa365247.aspx.  In particular:

<quote>
In the Windows API, the maximum length for a path is MAX_PATH, which is defined 
as 260 characters. A path is structured in the following order: drive letter, 
colon, backslash, components separated by backslashes, and a null-terminating 
character, for example, the maximum path on the D drive is "D:\<256 chars>NUL".
</quote>

And

<quote>
The Unicode versions of several functions permit a maximum path length of 
approximately 32,000 characters composed of components up to 255 characters in 
length. To specify that kind of path, use the "\\?\" prefix.
</quote>


So many non-Unicode APIs may have MAX_PATH (260) limit for the *entire* path.  
The Unicode APIs have ~32K char limit with components each having a max of 255. 
 The .NET framework does its best to use the Unicode APIs internally.

- Danilo


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to