From: Richard W.M. Jones Date: Tue, 17 Sep 2013 11:16:14 +0000 (+0100) Subject: Implement // and quote. X-Git-Tag: 0.2~35 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=7967057ada774e1b953de38a8d73f6009ce602ef;p=goaljobs.git Implement // and quote. These are just wrappers around Filename functions from the stdlib. --- diff --git a/goaljobs.ml b/goaljobs.ml index 4f99de4..1aa8c0d 100644 --- a/goaljobs.ml +++ b/goaljobs.ml @@ -21,6 +21,9 @@ open Printf open Goaljobs_config +let (//) = Filename.concat +let quote = Filename.quote + type goal_result_t = Goal_OK | Goal_failed of string exception Goal_result of goal_result_t diff --git a/goaljobs.mli b/goaljobs.mli index 07d717b..072fcef 100644 --- a/goaljobs.mli +++ b/goaljobs.mli @@ -171,6 +171,11 @@ val url_contains_string : string -> string -> bool There is also a goal version of this function. *) +val (//) : string -> string -> string + (** Concatenate two paths. *) + +val quote : string -> string + (** Quote the string to make it safe to pass directly to the shell. *) (** {2 Shell}