My php framework uses DIRECORY_SEPARATOR
constant instead of /
. Can there be any other options for a directory separator?
On MacOS, the directory separator is :
, on Windows, it is , and on VMS, it is
.
.
MacOS is no longer in use, though. OSX uses /
, but continues to support :
. Windows largely supports /
, although for some APIs, you must use .
Of the popular software today there are only two different directory seperators: / and . Windows being the one using also happens to support / of all the api’s and command line tools accepting a file path as argument.
I have often on windows used / as a seperator from both Java and .NET code and I have never experienced any trouble.
To answer your question. There are no examples of operating systems in use today that doesn’t support / as directory seperator.