Filename.current_dir_name is likely to be just ".", it indicates the (location-agnosti) way to refer to the current directory on your system, to make it easier to write code that is portable on other operating systems with different path conventions.

You are probably looking for

    Sys.getcwd : unit -> string

which when called returns the current working directory (as the `pwd` command would do). It may of course change over the time of your program execution, for example if you called Sys.chdir. There is also

  Sys.executable_name : string

(or Sys.argv.(0)) which contains the path of the executable, but it may be a relative path -- it depends on how the program was invoked.

On Wed, Oct 5, 2016 at 10:11 AM, Gustave Nimant <gustave.nimant@free.fr> wrote:
Dear list,

I would like to get the path of the current directory where the current executed module is implemented.
Is there any builtin constant ?
I could not find.

Thanks,
Gustave

--
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs