3 ms·
CreateFile and friends will indeed treat "/" and "\" the same, it's even documented that way these days. Except if you are ever in a corner and need to prepend
by banana_giraffe 3y ago
CreateFile and friends will indeed treat "/" and "\" the same, it's even documented that way these days. Except if you are ever in a corner and need to prepend the path with "\\?\" to get around other limitations.
For a while, I think it was the only supported way to have paths longer than 260 characters, so I've seen some high level APIs add it to the path to work around issues (C# used to do this in some paths, not sure if it still will).
It might be rare, but as someone that's had to debug a "why doesn't c:/whatever/data.dat work but c:\whatever\data.dat does?" issue, I err on using the correct file separator.