Module OpamFilename.Unix

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

type filename = t

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

include OpamStd.ABSTRACT
type t
val compare : t -> t -> int
val equal : t -> t -> bool
val of_string : string -> t
val to_string : t -> string
val to_json : t OpamJson.encoder
val of_json : t OpamJson.decoder
module Set : OpamStd.SET with type elt = t
module Map : OpamStd.MAP with type key = t
module Base : sig ... end
module Dir : sig ... end
module Op : sig ... end
val of_filename : filename -> t

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

val to_filename : t -> filename

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

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

Check whether a filename starts by a given Dir.t

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

Remove a prefix from a file name

val basename : t -> Base.t

Return the base name

val dirname : t -> Dir.t

Return the directory name

val to_relative_canonical : t -> (t, string) Stdlib.result
val root_dir : t -> string option

Return the first element of the path, if not empty