X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/7db53a0b3693ddd01e6a36fc5bfb4ba56b4656eb..1638d5a206cd79e9619f0d3334fed29eaddc6b51:/src/slave.sig diff --git a/src/slave.sig b/src/slave.sig index b9abecd..c413a07 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, @@ -60,4 +62,19 @@ signature SLAVE = sig 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