In Racket, how do I get or change my working directory?
Use current-directory
.
Passing no arguments returns the current working directory. Passing a path changes the working directory to that path.
Here's an example for the REPL that prints the current directory, then changes to the parent directory:
> (current-directory)
#<path:/home/sage/>
> (current-directory (build-path (current-directory) ".."))
; now in /home