Module Filepath

module Filepath: sig .. end
Functions manipulating filepaths. In these functions, references to the present working directory refer to the result given by function Sys.getcwd.

val normalize : ?base:string -> string -> string
returns an absolute path leading to the given file.
Change in Aluminium-20160501: optional base.
val relativize : ?base:string -> string -> string
relativize base file returns a (strict) relative path of file w.r.t. base, if base is a prefix of file; otherwise, returns file unchanged. The default base is the present working directory.
Since Aluminium-20160501
val is_relative : ?base:string -> string -> bool
returns true if the file is strictly relative to base (that is, it is prefixed by base), or to the present working directory if no base is specified.
Since Aluminium-20160501
val pretty : string -> string
Pretty-print a path according to these rules:
Since Neon-20140301
val add_symbolic_dir : string -> string -> unit
add_symbolic_dir name dir indicates that the (absolute) path dir must be replaced by name when pretty-printing paths. This alias ensures that system-dependent paths such as FRAMAC_SHARE are printed identically in different machines.