module Fc_Filepath: Filepathtype existence =
| |
Must_exist |
(* |
File must exist.
| *) |
| |
Must_not_exist |
(* |
File must not exist.
| *) |
| |
Indifferent |
(* |
No requirement.
| *) |
exception No_file
existence is Must_exist.exception File_exists
existence is Must_not_exist.val normalize : ?existence:existence -> ?base_name:string -> string -> stringrealpath --no-symlinks.
Some special behaviors include:normalize "" (empty string) returns ""
(realpath returns an error);normalize preserves multiple sequential '/' characters,
unlike realpath;realpath may lead to ENOTDIR errors,
but normalize may accept them.val relativize : ?base_name:string -> string -> stringrelativize base_name file_name returns a relative path name of
file_name w.r.t. base_name, if base_name is a prefix of file;
otherwise, returns file_name unchanged.
The default base name is the current working directory name.val is_relative : ?base_name:string -> string -> boolbase
(that is, it is prefixed by base_name), or to the current
working directory if no base is specified.val pretty : string -> stringNormalized.to_pretty_string instead.
Pretty-print a path according to these rules:Filepath.add_symbolic_dir for more details.
Therefore, the result of this function may not designate a valid name
in the filesystem.val add_symbolic_dir : string -> string -> unitadd_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.module Normalized:sig..end
Normalized module is simply a wrapper that ensures that paths are
always normalized.
type position = {
|
pos_path : |
|
pos_lnum : |
|
pos_bol : |
|
pos_cnum : |
val pp_pos : Format.formatter -> position -> unit