X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/d351d679283a797c98f5f65d18aa757c18e56305..f924c1cf6ee6ac92e7606b2d9577a130e89912e5:/src/slave.sig diff --git a/src/slave.sig b/src/slave.sig index a3d322f..b6c90fa 100644 --- a/src/slave.sig +++ b/src/slave.sig @@ -22,9 +22,11 @@ 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, @@ -43,6 +45,10 @@ signature SLAVE = sig val shell : string list -> bool val shellF : string list * (string -> string) -> unit + val shellOutput : string list -> string option + val run : string * string list -> bool + val runOutput : string * string list -> bool * string option + (* Like shellOutput, but return status and lines and don't use the shell *) val concatTo : (string -> bool) -> string -> unit (* Search through the result configuration hierarchy for all files matching @@ -64,4 +70,15 @@ signature SLAVE = sig 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