package ojs_base

  1. Overview
  2. Docs

Handling file paths.

type t
val to_yojson : t -> Yojson.Safe.t
module Map : Stdlib.Map.S with type key = t
module Set : Stdlib.Set.S with type elt = t
val dir_sep : char
val empty : t
val root : t
val is_absolute : t -> bool
val path : t -> string list
val of_string : string -> t
val to_string : t -> string
val basename : t -> string
  • raises Invalid_argument

    is the path is empty.

val parent : t -> t
val append : t -> string list -> t
val append_path : t -> t -> t
val is_prefix : t -> t -> bool
val normalize : t -> t

normalize path returns path where Filename.parent_dir_name and Filename.current_dir_name have been handled so they don't appear anymore. Note that /.. becomes / (i.e. no error in case there are too many separators).

OCaml

Innovation. Community. Security.