What does \\?\ mean when prepended to a file path

后端 未结 2 596

I found a reference to a file in a log that had the following format:

\\\\?\\C:\\Path\\path\\file.log

I cannot find a reference to what the

2条回答
  •  醉酒成梦
    2020-11-28 05:42

    The Windows API parses input strings for file I/O. Among other things, it translates / to \ as part of converting the name to an NT-style name, or interpreting the . and .. pseudo directories. With few exceptions, the Windows API also limits path names to 260 characters.

    The documented purpose of the \\?\ prefix is:

    For file I/O, the "\\?\" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system.

    This allows the use of . or .. in path names, as well as relaxing the 260 character path name limit, if the underlying file system supports long paths and file names.

提交回复
热议问题