Add Augeas.defvar
[ocaml-augeas.git] / augeas.mli
index 327dc02..80a94f2 100644 (file)
@@ -28,6 +28,10 @@ type flag =
   | AugNoStdinc
   | AugSaveNoop
   | AugNoLoad
+  | AugNoModlAutoload
+  | AugEnableSpan
+  | AugNoErrClose
+  | AugTraceModuleLoading
   (** Flags passed to the {!create} function. *)
 
 type error_code =
@@ -90,6 +94,11 @@ val close : t -> unit
 
       Do not use the handle after closing it. *)
 
+val defvar : t -> string -> string option -> int option
+  (** [defvar t name expr] defines [name] whose value is the result
+      of evaluating [expr], replacing the old value if existing.
+      [None] as [expr] removes the variable [name]. *)
+
 val get : t -> path -> value option
   (** [get t path] returns the value at [path], or [None] if there
       is no value. *)
@@ -127,3 +136,8 @@ val set : t -> path -> value option -> unit
 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]. *)
+
+val source : t -> path -> path option
+  (** [source t path] returns the path to the node representing the
+      file to which [path] belongs, or [None] if [path] does not
+      represent any file. *)