4 ms·
While MAX_PATH is 260, most of the Unicode variants of the API functions allow for paths of 32,767 characters [1]. That seems like a decent length. [1] http://
by hoov 14y ago
While MAX_PATH is 260, most of the Unicode variants of the API functions allow for paths of 32,767 characters [1]. That seems like a decent length.
[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa36...
- TazeTSchnitzel 14y agoOh, that's somewhat reassuring. I'll surely benefit from it in 10 years time. :/
- hoov 14y agoI'm not sure that I know what you mean. These functions aren't obscure and have been around for quite a while. For example: CreateFileW [1]. It's just good hygiene to use the Unicode variants and normalize to UNC where appropriate. This has been the case for years. [1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa36...
- TazeTSchnitzel 14y agoI mean that to maintain compatibility with legacy stuff I expect I won't be able to take advantage of it for quite a while.
- gburt 14y agoSo there's a constant for path length that only applies sometimes...
- flatline 14y agoThis is also the case on Unix. According to Advanced Programming in the Unix Environment, it is true of many of these so-called limits. The POSIX standard defined many values that were too small for modern-day use, such as _POSIX_PATH_MAX set to 255. The non-posix values are not all defined in limits.h, and must be queried at runtime. Even then, some are indeterminate. But at least you're not relegated to 255 characters;)