5

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?

glennsl
  • 28,186
  • 12
  • 57
  • 75
Guy Coder
  • 24,501
  • 8
  • 71
  • 136

1 Answers1

8

Many system calls can be done via sys

In your case, Sys.getcwd();;

Jackson Tale
  • 25,428
  • 34
  • 149
  • 271