Current directory @__DIR__

How do i make julia think she is in a specific directory?

exe = """
    begin
        @info @__DIR__
        @info pwd()
    end
"""

cmd = Base.julia_cmd()
cmd = `$cmd -e $exe`

procs = open(cmd)

I need to be able to set where the code is run from. How can I do it?

How do i make julia think she is in a specific directory?

Please note the Julia Community guidelines. In particular the programming language Julia has no gender.

You are looking for the cd function, or Cmd(``, dir="/tmp"). The latter creating a cmd object with a particular working directory, the former changing the current directory.

3 Likes