-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support Windows local device paths in Path
#15590
base: master
Are you sure you want to change the base?
Support Windows local device paths in Path
#15590
Conversation
I'm not quite sure that I understand if there's a difference between |
Only exactly As |
What about adding some specs with |
There are 7 types of user-space paths on Win32:
C:\foo
)C:foo
)\foo
)foo
)\\server\share\foo
)\\.\NUL
,\\?\C:\foo
)\\.
,\\?
)Local device paths starting with exactly
\\?\
are also known as raw local device paths. Other than this prefix, all forward and backward slashes are interchangeable.Path
already recognizes the first 5 of them; this PR adds the remaining 2. As noted in #15587, the\\.\
prefix appears when dealing with special devices, such as\\.\NUL
and\\.\COM15
, as well as named pipes. The\\?\
prefix is useful when passing paths to Win32 functions that are already normalized, or if the path exceeds 260 UTF-16 code units (see also #13420).This does not cover NT paths of the form
\??\...
. They appear in the reparse data area of Windows symbolic links.Depends on #15583 and #15584.