5
votes

Within OCaml toplevel I am trying to print the current directory.

i.e.

# Filename.current_dir_name;;

which returns

- : string = "."

which is not very useful.

What is the toplevel command needed to display the full path of the current directory?

1

1 Answers

8
votes

Many system calls can be done via sys

In your case, Sys.getcwd();;