Are Extended-Length Paths safe to use?

前端 未结 3 773
故里飘歌
故里飘歌 2021-01-14 11:03

I just stumbled on this article on MSDN that says a path can be 259 characters + NUL termination, but if you prefix it with \"\\\\?\\\" WinAPI allows you to use the

3条回答
  •  -上瘾入骨i
    2021-01-14 11:31

    Are you asking why all components in Windows do not support it, or are you asking whether it's legal to use these long paths?

    You can definitely safely use them, but you may irritate someone who wants to use tools like Explorer to browse them. We see paths like this all the time in the wild. Sometimes people are pretty surprised when they can't use MY_FAVORITE_TOOL to delete it...

提交回复
热议问题