Fix regeneration of multi-file dependencies
[hcoop/domtool2.git] / src / slave.sig
index 76a4b05..7471d86 100644 (file)
@@ -22,11 +22,14 @@ signature SLAVE = sig
 
     datatype file_action =
             Add
-          | Delete
+          | Delete of bool (* Set to true to really delete the file *)
           | Modify
 
+    val isDelete : file_action -> bool
+
     type file_status = {action : file_action,
                        domain : string,
+                       dir : string,
                        file : string}
 
     val registerFileHandler : (file_status -> unit) -> unit
@@ -42,9 +45,37 @@ signature SLAVE = sig
 
     val shell : string list -> bool
     val shellF : string list * (string -> string) -> unit
+    val shellOutput : string list -> string option
 
     val concatTo : (string -> bool) -> string -> unit
     (* Search through the result configuration hierarchy for all files matching
      * the predicate, concatenating their contents in arbitrary order to the
      * given file. *)
+
+    val enumerateTo : (string -> bool) -> string -> string -> unit
+    (* Search through the result configuration hierarchy for all files matching
+     * the predicate, writing a list of their domains to the file named by the
+     * third argument, delimiting the entries with the second argument. *)
+
+    val hostname : unit -> string
+    (* Get hostname of this machine *)
+
+    val readList : string -> string list
+    val writeList : string * string list -> unit
+    (* Reading and writing lists of strings stored on separate lines in files *)
+
+    val lineInFile : string -> string -> bool
+    (* Is there a line in the file (first arg) that matches that given? *)
+
+    val inGroup : {user : string, group : string} -> bool
+    (* Check membership in a UNIX group. *)
+
+    val mkDirAll : string -> unit
+    (* [mkDirAll p] creates directory "p", creating all parent directories, as
+     * necessary. *)
+
+    val remove : ''a list * ''a -> ''a list
+    val removeDups : ''a list -> ''a list
+
+    val moveDirCreate : { from : string, to : string } -> unit
 end