3 ms·
In terms of file path, windows seems to always support \\ or /, both in API or in software like Explorer. That's still true for Windows 10. That leads to some
by nolok 11y ago
In terms of file path, windows seems to always support \\ or /, both in API or in software like Explorer. That's still true for Windows 10.
That leads to some interesting answers on stackoverflow sometimes about cross compatibility, where the correct answer of "use whatever constant your language has for directory separator" gets down-voted in favor of "use forward slash everywhere".
- pjmlp 11y agoBecause it isn't the correct answer. Many applications assume \ and deal with paths directly, instead of using the Windows APIs for path manipulation. This means the moment your application gives a / to another application, there is a high probability that it will break, regardless of what the Windows API supports. Even cmd doesn't handle / properly.
- nolok 11y agoI know, you will notice I said above "the correct answer [...] gets down-voted", I was not suggesting using forward slash was the way to go. You can take it as a side criticism of how things are turning sour on stackoverflow with "popular" being more valuable that "right", I guess.