Displaying 2 results from an estimated 2 matches for "7d0b38f".
2015 Jul 01
0
[PATCH 2/3] mllib: add and use last_part_of
...;) -> true
| _ -> false
+
+(** Return the last part of a string, after the specified separator. *)
+let last_part_of str sep =
+ let i = String.rindex str sep in
+ String.sub str (i+1) (String.length str - (i+1))
diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli
index a5b0a68..7d0b38f 100644
--- a/mllib/common_utils.mli
+++ b/mllib/common_utils.mli
@@ -178,3 +178,6 @@ val mkdir_p : string -> int -> unit
val guest_arch_compatible : string -> bool
(** Are guest arch and host_cpu compatible, in terms of being able
to run commands in the libguestfs appliance? *)
+
+v...
2015 Jul 01
5
[PATCH 1/3] mllib: add an optional filter for rm_rf_only_files
This way it is possible to use rm_rf_only_files, but not removing
specific files.
---
mllib/common_utils.ml | 8 +++++++-
mllib/common_utils.mli | 5 ++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 516cff3..3737b4c 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -640,13 +640,19 @@ let rmdir_on_exit =
*