package eio

  1. Overview
  2. Docs
Effect-based direct-style IO API for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

eio-1.6.tbz
sha256=c1f04986b401094176494863dde1ca9b292b59fdc679a9d7023e558d80fb5b15
sha512=92ed8cf20300b8a4e0141bdbc373c0803c5a24530cb65852637d905fff4a5b956a8859a00a424034ff78c1112da9b0391194bcd558326168bdebd1ce683a8890

doc/eio.utils/Eio_utils/Nt_path/index.html

Module Eio_utils.Nt_pathSource

Windows path syntax.

  • join dir step appends step to dir using "\\" as the directory separator, unless dir already ends in a separator. After a bare drive (C:) no separator is added, to keep the path drive-relative.
  • split: Volume prefixes (C:, \\server\share, \\?\..., \??\...) are never split.
include Eio.Fs.Pi.PATH
Sourceval split : Eio.Fs.path -> (Eio.Fs.path * string) option

The implementation of Eio.Path.split.

The implementation of Eio.Path.(/).

Sourceval is_relative : string -> bool

is_relative p is true unless p begins with a volume or a separator. A drive-relative path such as C:x is not relative, since it is resolved against that drive's own current directory rather than ours.

Sourceval dirname : string -> string

dirname p is the directory part of p. It is "." when p names something in the current directory, and also when p has no parent to name (e.g. the empty path, a bare volume (C:) and a root (\\server\share)).

Sourceval basename : string -> string

basename p is the final component of p. It is p itself when p has no directory part, and "." when p is empty.

Sourceval to_nt : cwd:string -> string -> string

to_nt ~cwd path is the NT object-manager form of the Win32 path path.

A relative path is resolved against cwd and, as in Win32, "/" is a separator and "." and ".." components are removed. Verbatim (\\?\...) and NT (\??\...) paths are passed through unchanged.