From 1dda1179aa328f058e8d5e5129663b9d404a6c5a Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Tue, 28 Mar 2017 14:50:04 +0100 Subject: [PATCH] Add some doc in Path --- src/path.mli | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/path.mli b/src/path.mli index 73541614..b01c98a6 100644 --- a/src/path.mli +++ b/src/path.mli @@ -60,8 +60,22 @@ val parent : t -> t val extend_basename : t -> suffix:string -> t +(** Extract 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 : t -> (string * t) option + +(** Same as [extract_build_context] but return the build context as a path: + + {[ + extract_build_context "_build/blah/foo/bar" = Some ("_build/blah", "foo/bar") + ]} +*) val extract_build_context_dir : t -> (t * t) option + val is_in_build_dir : t -> bool val insert_after_build_dir_exn : t -> t -> t