I would like to read/write files in a folder in D drives say D:\data. I hope it works for Julia both in windows and wsl2. I tried joinpath() but cannot figure out how to make it.
I start Julia in the home dir (or some project dir in various drives). I have explored @DIR and homedir(). Can joinpath() or some other function achieve the requests below?
-
Under Ubuntu in wsl2, the home dir is “/home/workstation” and the file is in the mounted drive “/mnt/d/data”. How can I read.CSV(joinpath(…))?
-
Under Windows, the home dir is “C:\Users\workstation” and the file is in another drive: “D:\data”. How can I read.CSV(joinpath(…))?
-
Is there a uniform way to read files in the data folder of D drive no matter I start Julia from the home dir of Windows or Ubuntu?
I know I can do these by typing all the real paths, but I belive there should be some smart way.