Displaying 2 results from an estimated 2 matches for "0219b7e".
Did you mean:
021974
2015 Mar 05
0
[PATCH v2] customize: add --truncate-recursive option
...\
+This command recursively truncates all files under \"path\" to zero-length.";
+ };
+
{ op_name = "timezone";
op_type = String "TIMEZONE";
op_discrim = "`Timezone";
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 76d8b79..0219b7e 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -619,6 +619,14 @@ let rm_rf_only_files (g : Guestfs.guestfs) dir =
List.iter g#rm files
)
+let truncate_recursive (g : Guestfs.guestfs) dir =
+ if g#is_dir dir then (
+ let files = Array.map (Filename.concat dir) (g#fin...
2015 Mar 05
2
[PATCH v2] customize: add --truncate-recursive option
Allows user to recursively truncate all files in a directory.
Related to RHBZ#119673
Maros Zatko (1):
customize: add --truncate-recursive option
builder/cmdline.ml | 3 ++-
customize/customize_run.ml | 4 ++++
generator/customize.ml | 8 ++++++++
mllib/common_utils.ml | 8 ++++++++
mllib/common_utils.mli | 2 ++
5 files changed, 24 insertions(+), 1 deletion(-)
--
1.9.3