module Augeas:Augeas OCaml bindingssig..end
type t
exception Error of string
type flag =
| |
AugSaveBackup |
(* | Rename original with .augsave | *) |
| |
AugSaveNewFile |
(* | Save changes to .augnew | *) |
| |
AugTypeCheck |
(* | Type-check lenses | *) |
Augeas.create function.typepath =string
Note in future we may replace this with a type-safe path constructor.
typevalue =string
val create : string -> string option -> flag list -> tcreate root loadpath flags creates an Augeas handle.
root is a file system path describing the location
of the configuration files.
loadpath is an optional colon-separated list of directories
which are searched for schema definitions.
flags is a list of flags.
val close : t -> unitclose handle closes the handle.
You don't need to close handles explicitly with this function: they will be finalized eventually by the garbage collector. However calling this function frees up any resources used by the underlying Augeas library immediately.
Do not use the handle after closing it.
val get : t -> path -> value optionget t path returns the value at path, or None if there
is no value.val exists : t -> path -> boolexists t path returns true iff there is a value at path.val insert : t -> ?before:bool -> path -> string -> unitinsert t ?before path label inserts label as a sibling
of path. By default it is inserted after path, unless
~before:true is specified.val rm : t -> path -> intrm t path removes all nodes matching path.
Returns the number of nodes removed (which may be 0).
val matches : t -> path -> path listmatches t path returns a list of path expressions
of all nodes matching path.val count_matches : t -> path -> intcount_matches t path counts the number of nodes matching
path but does not return them (see Augeas.matches).val save : t -> unitsave t saves all pending changes to disk.