I know that file system access in WinRT is different (read: isolated), but I'm curious if we still have to worry about MAX_PATH, or has that restriction been avoided?
In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character.
Microsoft Windows has a MAX_PATH limit of ~256 characters. If the length of the path and filename combined exceed ~256 characters you will be able to see the path/files via the Windows Explorer, but may not be able to delete/move/rename these paths/files.
No, the MAX_PATH restrictions haven't been lifted - if you pass a path longer than MAX_PATH to a windows runtime API which accepts a path, it is still possible it will fail. But MAX_PATH is far less likely to be relevant, since windows runtime APIs typically operate on strings, and not on buffers of characters.
In addition, since metro style apps are typically restricted in the directories that they access, deep paths are less likely to be encountered.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With