package alba

  1. Overview
  2. Docs
Alba compiler

Install

Dune Dependency

Authors

Maintainers

Sources

0.4.2.tar.gz
sha256=203ee151ce793a977b2d3e66f8b3a0cd7a82cc7f15550c63d88cb30c71eb5f95
md5=64367c393f80ca784f88d07155da4fb0

doc/alba.fmlib/Fmlib/Io/Output/argument-1-Io/Path/index.html

Module Io.Path

val absolute : string -> string t

absolute path converts path into an absolute path.

val split : string -> (string * string) option

split path splits path into a dirname and a basename if possible.

Examples:

  split ""                = None
  split "/"               = None
  split "/hello"          = Some ("/", "hello")
  split "/User/name/xxx/" = Some("/User/name", "xxx")
  split "/User/name/xxx"  = Some("/User/name", "xxx")
val normalize : string -> string

normalize path removes duplicate path separators and normalizes "." and ".." segments.

Examples:

  normalize ""            = "."
  normalize "/"           = "/"
  normalize "////"        = "/"
  normalize "a//b"        = "a/b"
  normalize "a/./b"       = "a/b"
  normalize "a/../b"      = "b"
  normalize "a/b/../../c" = "c"
  normalize "../a"        = "../a"
val join : string -> string -> string

join dir file joins the directory name dir with the file name file.

OCaml

Innovation. Community. Security.