Module Stdune.Path
module Local : sig ... endIn the current workspace (anything under the current project root)
module External : sig ... endIn the outside world
module Kind : sig ... endval to_sexp : t Sexp.Encoder.tval compare : t -> t -> Ordering.ta directory is smaller than its descendants
module Set : sig ... endval of_string : ?error_loc:Stdune__.Loc0.t -> string -> tval to_string : t -> stringval to_string_maybe_quoted : t -> stringto_string_maybe_quoted tismaybe_quoted (to_string t)
val kind : t -> Kind.tval root : tval is_root : t -> boolval is_managed : t -> boolval relative : ?error_loc:Stdune__.Loc0.t -> t -> string -> tval of_filename_relative_to_initial_cwd : string -> tCreate an external path. If the argument is relative, assume it is relative to the initial directory dune was launched in.
val to_absolute_filename : t -> stringConvert a path to an absolute filename. Must be called after the workspace root has been set.
rootis the root directory of local paths
val reach : t -> from:t -> stringval reach_for_running : ?from:t -> t -> stringfromdefaults toPath.root
val descendant : t -> of_:t -> t optionval is_descendant : t -> of_:t -> boolval append : t -> t -> tval append_local : t -> Local.t -> tval basename : t -> stringval parent : t -> t optionval parent_exn : t -> tval is_suffix : t -> suffix:string -> boolval extend_basename : t -> suffix:string -> tval extract_build_context : t -> (string * t) optionExtract the build context from a path. For instance, representing paths as strings:
extract_build_context "_build/blah/foo/bar" = Some ("blah", "foo/bar")
val extract_build_context_dir : t -> (t * t) optionSame as
extract_build_contextbut return the build context as a path:extract_build_context "_build/blah/foo/bar" = Some ("_build/blah", "foo/bar")
val drop_build_context_exn : t -> tval drop_optional_build_context : t -> tDrop the "_build/blah" prefix if present, return
totherwise
val sandbox_managed_paths : sandbox_dir:t -> t -> tTransform managed paths so that they are descedant of
sandbox_dir.
val explode : t -> string list optionval explode_exn : t -> string listval build_dir : tThe build directory
val is_in_build_dir : t -> boolis_in_build_dir t = is_descendant t ~of:build_dir
val is_in_source_tree : t -> boolis_in_build_dir t = is_managed t && not (is_in_build_dir t)
val is_alias_stamp_file : t -> boolval is_strict_descendant_of_build_dir : t -> boolis_strict_descendant_of_build_dir t = is_in_build_dir t && t <> build_dir
val insert_after_build_dir_exn : t -> string -> tval exists : t -> boolval readdir_unsorted : t -> string listval is_directory : t -> boolval rmdir : t -> unitval unlink : t -> unitval unlink_no_err : t -> unitval rm_rf : t -> unitval mkdir_p : t -> unitval extension : t -> stringval split_extension : t -> t * stringval pp : Stdlib.Format.formatter -> t -> unitval pp_in_source : Stdlib.Format.formatter -> t -> unitval pp_debug : Stdlib.Format.formatter -> t -> unitval build_dir_exists : unit -> boolval ensure_build_dir_exists : unit -> unitval set_build_dir : Kind.t -> unitset the build directory. Can only be called once and must be done before paths are converted to strings elsewhere.
val in_source : string -> tpaths guaranteed to be in the source directory
val of_local : Local.t -> tval set_root : External.t -> unitSet the workspace root. Can only be called once and the path must be absolute
module Internal : sig ... endInternal use only
module L : sig ... end