val empty : t
val root : t
val v : string -> t
val segs : t -> string list
val of_segs : string list -> t
val basename : t -> string
val to_string : t -> string
val has_ext : string -> t -> bool
Git.Path
Purpose of this module is little bit hard to understand. Indeed, in the previous version of ocaml-git, we used Fpath
to have a good abstraction of path in UNIX and Windows systems. However, Git keeps in some ways (INDEX file specially) the UNIX path semantic (tree and reference use it too). So, Path
is an abstraction (Git-path) to keep UNIX path semantic (and the separator "/"). However, we used it in few cases.
Indeed, any interation with a FS use an Fpath
and Path
is used only when we talk with the Git kernel (for example, the S.fold
function). The biggest differences between Fpath
and Path
is:
Path
__is__ (must be) relative with a Fpath
.Path
to an Fpath
then when we want to talk with the FS.It's really annoying to handle it like this but Windows is a shit.