1234567891011121314151617includeStdlib.Filename(** [realpath path] returns the absolute canonical path to file [path]. If
[path] is invalid (i.e., it does not describe an existing file), then the
exception [Invalid_argument] is raised. *)externalrealpath:string->string="c_realpath"letrecnormalizefname=ifSys.file_existsfnamethenrealpathfnameelseletdirnm=dirnamefnameinletbasenm=basenamefnameinconcat(normalizedirnm)basenm(** [current_dir ()] returns the canonical running path of the program. *)letcurrent_dir:unit->string=fun_->realpath"."