-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FoundationEssentials: add withNTPathRepresentation
#531
Conversation
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 <[email protected]>
@swift-ci please test |
Co-authored-by: Jeremy Schonfeld <[email protected]>
@swift-ci please test |
@jmschonfeld I think that this is ready to go - with this in, I think that #527 should be possible to merge. That will allow me to start making more progress towards FileManager support on Windows. |
Should this API also handle device names (so that e.g. |
I do like this suggestion, however, I do wonder if we need to implement that immediately. Right now the build is entirely overwhelming due to the number of errors and so testing is also impossible. Getting enough of the skeleton in place would allow us to ensure that we get the nuances like this correct. |
@swift-ci please test |
@swift-ci please test |
@swift-ci please test |
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.