module Path:sig..end
Path provides three types for handling paths. Values of type
Assemblage.Path.t are for paths that are either relative or absolute while
those of type Assemblage.Path.rel and Assemblage.Path.abs specialize to either
case.
Relative paths and absolute path each have corresponding modules
Assemblage.Path.Rel and Assemblage.Path.Abs with specialized functions. Conversion
between the three type of paths are explicit.
FIXME. We need to properly handle Filename.current_dir_name and
Filename.parent_dir_name in path segments.
typefilename =string
type rel
type abs
type t
val root : troot is the root absolute path (empty list of segments).val empty : tempty is the empty relative path (empty list of segments).val dash : tdash is the "-" relative path.val add : t -> string -> tadd p seg concatenates seg at the end of p. For any p,
add p "" = p.val concat : t -> rel -> tconcat p p' concatenates p' at the end of p.val (/) : t -> string -> tp / c is add p c. Left associative.val (//) : t -> rel -> tp // p' is concat p p'. Left associative.val file : filename -> tfile name is add empty f.val base : string -> tbase name is add empty f.val basename : t -> stringbasename p is the basename of p. If p has no segments the
empty string is returned.val dirname : t -> tdirname p is the dirname of p. If p has no segments p
is returned.val rem_prefix : t -> t -> rel optionrem_prefix pre p is p with the literal prefix pre removed. None
if pre is not a prefix of p.val find_prefix : t -> t -> t optionfind_prefix p p' is a common prefix for p and p'. There is
always a common prefix between path of the same kind (either Assemblage.Path.root
or Assemblage.Path.empty and None is only returned if p and p' are of
different kind.val is_root : t -> bool
val is_empty : t -> bool
val is_dash : t -> bool
val is_rel : t -> boolis_rel p is true iff p is a relative path.val is_abs : t -> boolis_abs p is true iff p is an absolute path.val is_prefix : t -> t -> boolis_prefix p p' is true if p is a literal prefix of p'.val equal : t -> t -> boolequal p p' is p = p'.val compare : t -> t -> intcompare p p' is Pervasives.compare p p'.val to_rel : t -> rel optionto_rel p is Some r if p is a relative path.val of_rel : rel -> tof_rel r is r as a path.val to_abs : t -> abs optionto_abs p is Some a if p is an absolute path.val of_abs : abs -> tof_abs a is a as a path.val to_segs : t -> [ `Abs of string list | `Rel of string list ]to_segs p is p's segments.val of_segs : [ `Abs of string list | `Rel of string list ] -> tof_segs segs is a path from segs segments.val to_string : t -> stringto_string p is the path p as a string according to
the driver's platform convention with Filename.dir_sep.val of_string : string -> tof_string s is the string s as a path. s is splitted
according to the driver's platform convention with Filename.dir_sep.val quote : t -> stringquote p is the path p as a string, quoted according
to the driver's platform conventions with Filename.quote.val pp : Format.formatter -> t -> unit
typeext =[ `A
| `Byte
| `C
| `Cma
| `Cmi
| `Cmo
| `Cmt
| `Cmti
| `Cmx
| `Cmxa
| `Cmxs
| `Css
| `Dll
| `Exe
| `Ext of string
| `Gif
| `H
| `Html
| `Img
| `Install
| `Jpeg
| `Js
| `Json
| `Lib
| `Md
| `Ml
| `Ml_dep
| `Ml_pp
| `Mli
| `Mli_dep
| `Mli_pp
| `Native
| `O
| `Opt
| `Png
| `Sh
| `So
| `Tar
| `Tbz
| `Xml
| `Zip ]
val ext_to_string : ext -> stringext_to_string ext is ext as a string (without separator).val ext_of_string : string -> extext_of_string ext is ext as a file extension (ext without
separator).val pp_ext : Format.formatter -> ext -> unit
val ext : t -> ext optionext p is p's last segment file extension (if any).val get_ext : t -> extget_ext p is p's last segment file extension.Invalid_argument if p's last segment has no file extension.val add_ext : t -> ext -> tadd_ext p ext is p with ext concatenated to p's last segment.val rem_ext : t -> trem_ext p is p with ext removed from p's last segment
(if it has an extension).val change_ext : t -> ext -> tchange_ext p e is add_ext (rem_ext p).val (+) : t -> ext -> tp + ext is add_ext p e. Left associative.val has_ext : ext -> t -> boolhas_ext p ext is true iff p's last segment has file extension
ext.val ext_matches : ext list -> t -> boolext_matches exts p is true iff p's last segment has a file
extension in exts.module Rel:sig..end
module Abs:sig..end
module Set:sig..end
module Map:sig..end