caml_named_value returns const value pointer in OCaml 4.09+
[ocaml-augeas.git] / augeas.mli
index 8e6ec6d..8cbeae1 100644 (file)
@@ -56,11 +56,12 @@ type transform_mode =
   | Exclude
   (** The operation mode for the {!transform} function. *)
 
-exception Error of error_code * string * string * string
+exception Error of error_code * string * string * string * string
   (** This exception is thrown when the underlying Augeas library
       returns an error.  The tuple represents:
       - the Augeas error code
       - the ocaml-augeas error string
+      - the Augeas error message
       - the human-readable explanation of the Augeas error, if available
       - a string with details of the Augeas error
    *)
@@ -115,6 +116,12 @@ val insert : t -> ?before:bool -> path -> string -> unit
       of [path].  By default it is inserted after [path], unless
       [~before:true] is specified. *)
 
+val label : t -> path -> string option
+  (** [label t path] gets the label of [path].
+
+      Returns [Some value] when [path] matches only one node, and
+      that has an associated label. *)
+
 val rm : t -> path -> int
   (** [rm t path] removes all nodes matching [path].
 
@@ -140,6 +147,13 @@ val load : t -> unit
 val set : t -> path -> value option -> unit
   (** [set t path] sets [value] as new value at [path]. *)
 
+val setm : t -> path -> string option -> value option -> int
+  (** [setm t base sub value] sets [value] as new value for all the
+      nodes under [base] that match [sub] (or all, if [sub] is
+      [None]).
+
+      Returns the number of nodes modified. *)
+
 val transform : t -> string -> string -> transform_mode -> unit
   (** [transform t lens file mode] adds or removes (depending on
       [mode]) the transformation of the specified [lens] for [file]. *)