Testing log directory backup
[hcoop/domtool2.git] / src / slave.sml
index a20f6db..7a507fa 100644 (file)
@@ -209,4 +209,18 @@ fun removeDups ls = List.foldr (fn (x, ls) =>
                                   else
                                       x :: ls) [] ls
 
                                   else
                                       x :: ls) [] ls
 
+fun copyDirCreate {from, to} =
+    (mkDirAll to;
+     if Posix.FileSys.access (from, []) then
+        ignore (OS.Process.system ("cp -r " ^ from ^ " " ^ to))
+     else
+        ())
+
+fun moveDirCreate {from, to} =
+    (mkDirAll to;
+     if Posix.FileSys.access (from, []) then
+        ignore (OS.Process.system ("mv " ^ from ^ " " ^ to))
+     else
+        ())
+
 end
 end