Hacker News new | past | comments | ask | show | jobs | submit login

Perhaps, but Windows's is a bit too low.



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/aa36...


So there's a constant for path length that only applies sometimes...


This 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;)


Oh, that's somewhat reassuring. I'll surely benefit from it in 10 years time. :/


I'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/aa36...


I mean that to maintain compatibility with legacy stuff I expect I won't be able to take advantage of it for quite a while.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: