File: path.mli

package info (click to toggle)
ocaml-eio 1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,548 kB
  • sloc: ml: 14,608; ansic: 1,237; makefile: 25
file content (26 lines) | stat: -rw-r--r-- 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module Rel : sig
  type t =
    | Leaf of { basename : string; trailing_slash : bool }
    | Self    (* A final "." *)
    | Child of string * t
    | Parent of t

  val concat : t -> t -> t

  val to_string : t -> string

  val dump : t Fmt.t
end

type t =
  | Relative of Rel.t
  | Absolute of Rel.t

val parse : string -> t
(** Note:
    [parse "" = Relative Self]
    [parse ".." = Relative (Parent Self)] *)

val to_string : t -> string

val dump : t Fmt.t