4 ms·
Indeed it does. You could talk about Windows the entire operating system, or you could talk about Windows as Win32, but either way - yes - they both have 260 c
by ethomson 10y ago
Indeed it does. You could talk about Windows the entire operating system, or you could talk about Windows as Win32, but either way - yes - they both have 260 character path length limits _by default_.
I realize that you're saying that Win32 doesn't have a hard limit of MAX_PATH since you can use Win32 file namespace paths (the `\\?\` prefix) to specify long paths. And yes, that's technically correct, you can. But realistically, unless you carefully control the paths that you're writing and no other program is using them, you're pretty much shooting yourself in the foot by trying to do that.
This is because most apps simply use the Win32 APIs with normal paths and not Win32 file namespace paths. So sure - you can write a file that has a name that's 1024 characters, or a file named `CON`, or a file named `hello?`, but only other programs that wisely use `\\?\` paths can do anything with that. Which is basically nothing except the program you just wrote.
It certainly doesn't include almost anything that Windows itself put down during installation. `cmd`, the Windows Shell, the whole of the CLR? None of these can read the file you just wrote.
So the title seems quite accurate to me.