package stramon-lib

  1. Overview
  2. Docs

Normalized absolute path representation

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val root : t
val to_parts : t -> string list
val of_parts : string list -> t option

Parts that are empty or are a single dot are ignored, i.e. [ "abc"; ""; "."; "def" ] is treated the same as [ "abc"; "def" ] .

.. goes back one level if possible, returns None if not possible.

Returns None if any part

  • has trailing backslashes (odd number of backslashes at the end)
  • or contains /
val of_parts_exn : string list -> t
val of_string : ?cwd:t -> string -> t option
val of_string_exn : ?cwd:t -> string -> t
val to_string : t -> string
OCaml

Innovation. Community. Security.