Functions like joinpath
use the appropriate OS-dependent separator when joining two paths (ie /
on Linux, \\
on Windows, etc). How do these functions know what separator to use?
Similarly, the root directory on Linux is /
, but on Windows is probably C:\\
. Is there a way to retrieve the OS-dependent root directory in Julia?
Note, I've had a look at the joinpath
source on github, and it appears to use an undocumented function pathsep(a,b)
and a global variable path_separator_re
, but I can't see how either of these work.