123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122open!Core(** An absolute path represents one or more path parts relative to the root directory.
Valid absolute path strings must be non-empty, must contain no null characters, and
must start with a slash.
Canonical absolute path strings must contain no consecutive slashes and must not end
in a slash, except for root path [/]. *)moduletypeS=sigmoduleTypes:Types.SopenTypes(** Absolute paths are a subtype of [Path.t] and therefore also of [string]. *)includeCommon.SwithmoduleType:=Types.AbsoluteincludeQuickcheckable.Swithtypet:=t(** The root directory, i.e. [/]. *)valroot:t(** Returns the final part of the given path, or [None] if given [root]. *)valbasename:t->Part.toption(** Returns the final part of the given path, or raises if given [root]. *)valbasename_exn:t->Part.t(** Returns the final part of the given path, or returns an error if given [root]. *)valbasename_or_error:t->Part.tOr_error.t(** Returns the final part of the given path, or [Part.dot] if given [root]. *)valbasename_defaulting_to_dot:t->Part.t(** Returns all parts of the given path but the final one, or [None] if given [root]. *)valdirname:t->toption(** Returns all parts of the given path but the final one, or raises if given [root]. *)valdirname_exn:t->t(** Returns all parts of the given path but the final one, or returns an error if given
[root]. *)valdirname_or_error:t->tOr_error.t(** Returns all parts of the given path but the final one, or [root] if given [root]. *)valdirname_defaulting_to_root:t->t(** Like [Option.both (dirname t) (basename t)]. Allocates [Some] at most once. *)valdirname_and_basename:t->(t*Part.t)option(** Adds the given string as a suffix of the path's basename. Raises if [t] is [root]
and therefore has no basename, or if the string contains characters that are illegal
for a path part. *)valappend_to_basename_exn:t->string->t(** Adds a part to the end of the path. *)valappend_part:t->Part.t->t(** Appends the parts of a relative path to the end of the absolute path. *)valappend:t->Relative.t->t(** Reports if the parts of [prefix] are a non-strict prefix of the parts of the other
argument. *)valis_prefix:t->prefix:t->bool(** Reports if the parts of [suffix] are a non-strict suffix of the parts of the other
argument. *)valis_suffix:t->suffix:Relative.t->bool(** Returns all parts of the given path after [prefix], or [None] if [prefix] is not a
prefix of the path's parts. If the path equals [prefix], returns [Relative.dot]. *)valchop_prefix:t->prefix:t->Relative.toption(** Returns all parts of the given path after [prefix], or raises if [prefix] is not a
prefix of the path's parts. If the path equals [prefix], returns [Relative.dot]. *)valchop_prefix_exn:t->prefix:t->Relative.t(** Returns all parts of the given path after [prefix], or returns an error if [prefix]
is not a prefix of the path's parts. If the path equals [prefix], returns
[Relative.dot]. *)valchop_prefix_or_error:t->prefix:t->Relative.tOr_error.t(** Returns all parts of the given path before [suffix], or [None] if [suffix] is not a
suffix of the path's parts. *)valchop_suffix:t->suffix:Relative.t->toption(** Returns all parts of the given path before [suffix], or raises if [suffix] is not a
suffix of the path's parts. *)valchop_suffix_exn:t->suffix:Relative.t->t(** Returns all parts of the given path before [suffix], or returns an error if [suffix]
is not a suffix of the path's parts. *)valchop_suffix_or_error:t->suffix:Relative.t->tOr_error.t(** Returns all parts of the given path before [suffix], or returns the path unchanged
if [suffix] is not a suffix of the path's parts. *)valchop_suffix_if_exists:t->suffix:Relative.t->t(** Removes [.] parts from the given path. *)valsimplify_dot:t->t(** Removes [.] parts from the given path. Cancels out [..] parts with preceding parts
(that are neither [.] nor [..]). Removes any [..] parts immediately following the
leading [/]. Does not check the file system; in the presence of symlinks, the
resulting path may not be equivalent. *)valsimplify_dot_and_dot_dot_naively:t->t(** Produces the parts of the path. *)valto_parts:t->Part.tlist(** Constructs an absolute path from the given parts. *)valof_parts:Part.tlist->t(** Equivalent to [List.length (to_parts t)], without allocating. *)valnumber_of_parts:t->intendmoduletypeAbsolute=sigmoduletypeS=SincludeSwithmoduleTypes:=TypesmoduleStable:Common.StablewithmoduleType:=Types.Absoluteend