Historically paths of Windows has length limited to 260 characters (also known as MAX_PATH).
To bypass such limitation long paths was introduced. Long path is a path with \\?\
prefix.
Also starting from Windows 10 version 1607 (released on August 2016) the limitiation could be lifted for all paths. To opt-in
- this feature must be enabled by editing registry or by using
gpedit.msc
tool - application's manifest must include
longPathAware
flag
Is it worth to add support for the longPathAware
in Swift toolchain? (Details: Maximum Path Length Limitation - Win32 apps | Microsoft Docs)
Also, not directly related to the Swift' toolchain, but does it make sense for open-source implementation of Foundation
to check length of a path, then prepend it with \\?\
if its length over limit, before calling functions like a CreateDirectoryW
?