package opam-core

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module OpamFilename.UnixSource

Unix type filenames. '/' is always the separator regardless of the current system

Sourcetype filename = t

of_string will translate filesystem dir sep to slashes '/'.

include OpamStd.ABSTRACT
Sourcetype t
Sourceval compare : t -> t -> int
Sourceval equal : t -> t -> bool
Sourceval of_string : string -> t
Sourceval to_string : t -> string
Sourcemodule Set : OpamStd.SET with type elt = t
Sourcemodule Map : OpamStd.MAP with type key = t
Sourcemodule Base : sig ... end
Sourcemodule Dir : sig ... end
Sourcemodule Op : sig ... end
Sourceval of_filename : filename -> t

Convert filename to a raw filename. Translates filesystem dir sep to slashes '/'.

Sourceval to_filename : t -> filename

Convert raw filename to a filename. Translates slashes '/' to filesystem dir sep.

Sourceval starts_with : Dir.t -> t -> bool

Check whether a filename starts by a given Dir.t

Sourceval remove_prefix : Dir.t -> t -> string

Remove a prefix from a file name

Sourceval basename : t -> Base.t

Return the base name

Sourceval dirname : t -> Dir.t

Return the directory name

Sourceval to_relative_canonical : t -> (t, string) result
Sourceval root_dir : t -> string option

Return the first element of the path, if not empty