julia> cd("/home/amend")
ERROR: IOError: chdir /home/amend: no such file or directory (ENOENT)
while julia> cd("D:\\Julia") #working
**Is it a must to start from C:\\ or D:\\ (in Window10)? What if I want to cd directory out of them?
In linux filesystem:
/home/amend #this branch
/mnt/d/ #rather than starting from D:\\ here
The tricks as below fails as well.
julia> cd(D:\\..\\..\\home\\amend")
ERROR: syntax: "\" is not a unary operator
julia> cd("~")
ERROR: IOError: chdir ~: no such file or directory (ENOENT)
Use raw"D:\\Julia", as otherwise \\ is interpreted as an escape for a single backslash. Oh, silly me, you want a single backslash here. I can never keep Windows path conventions straight.
You were missing the opening quote. Use cd(raw"D:\..\..\home\Amend")
but it seems not to set home directory or open a file. I guess I didn’t get
what joinpath() should be used for (except termininologies like nodes)
whether it cannot allow path out of mnt as well, if looking at its documentary:
" Join path components into a full path. If some argument is an absolute path or (on Windows) has a drive specification that doesn’t match the drive computed for the join of the preceding paths, then prior components are dropped."
Thanks I get it~
but is there any chance to set /home/amend instead of /mnt/d/anyfile as home directory in julia? This would be helpful to work between linux and julia.