mirror of
https://github.com/apple/swift-foundation.git
synced 2025-05-23 05:50:12 +08:00
This helper allows us to convert paths to the NT path representation. The NT Path representation is important for internal usage as it allows us to bypass the `MAX_PATH` (261) limit for Win32 APIs. In order to do this, we simply escape the string with the NT prefix (`\\?\`) which requires that the path is normalised (uses `\` rather than `/`) and generally should be an absolute path. Using the NT path allows us to use the fully supported 32k character path length of the NT kernel. Co-authored-by: Alexander Smarus <bender@readdle.com> Co-authored-by: Jeremy Schonfeld <1004103+jmschonfeld@users.noreply.github.com>