<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="Up" href="index.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Augeas" rel="Chapter" href="Augeas.html"><title>Augeas</title> </head> <body> <div class="navbar"> <a class="up" href="index.html" title="Index">Up</a> </div> <h1>Module <a href="type_Augeas.html">Augeas</a></h1> <pre><span class="keyword">module</span> Augeas: <code class="code">sig</code> <a href="Augeas.html">..</a> <code class="code">end</code></pre><div class="info"> Augeas OCaml bindings<br> </div> <hr width="100%"> <pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre> <div class="info"> Augeas library handle.<br> </div> <pre><span id="EXCEPTIONError"><span class="keyword">exception</span> Error</span> <span class="keyword">of</span> <code class="type">string</code></pre> <div class="info"> This exception is thrown when the underlying Augeas library returns an error.<br> </div> <pre><code><span id="TYPEflag"><span class="keyword">type</span> <code class="type"></code>flag</span> = </code></pre><table class="typetable"> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTflag.AugSaveBackup"><span class="constructor">AugSaveBackup</span></span></code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Rename original with .augsave</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTflag.AugSaveNewFile"><span class="constructor">AugSaveNewFile</span></span></code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Save changes to .augnew</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTflag.AugTypeCheck"><span class="constructor">AugTypeCheck</span></span></code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Type-check lenses</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr></table> <div class="info"> Flags passed to the <a href="Augeas.html#VALcreate"><code class="code">Augeas.create</code></a> function.<br> </div> <pre><span id="TYPEpath"><span class="keyword">type</span> <code class="type"></code>path</span> = <code class="type">string</code> </pre> <div class="info"> A path expression. <p> Note in future we may replace this with a type-safe path constructor.<br> </div> <pre><span id="TYPEvalue"><span class="keyword">type</span> <code class="type"></code>value</span> = <code class="type">string</code> </pre> <div class="info"> A value.<br> </div> <pre><span id="VALcreate"><span class="keyword">val</span> create</span> : <code class="type">string -> string option -> <a href="Augeas.html#TYPEflag">flag</a> list -> <a href="Augeas.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">create root loadpath flags</code> creates an Augeas handle. <p> <code class="code">root</code> is a file system path describing the location of the configuration files. <p> <code class="code">loadpath</code> is an optional colon-separated list of directories which are searched for schema definitions. <p> <code class="code">flags</code> is a list of flags.<br> </div> <pre><span id="VALclose"><span class="keyword">val</span> close</span> : <code class="type"><a href="Augeas.html#TYPEt">t</a> -> unit</code></pre><div class="info"> <code class="code">close handle</code> closes the handle. <p> 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. <p> Do not use the handle after closing it.<br> </div> <pre><span id="VALget"><span class="keyword">val</span> get</span> : <code class="type"><a href="Augeas.html#TYPEt">t</a> -> <a href="Augeas.html#TYPEpath">path</a> -> <a href="Augeas.html#TYPEvalue">value</a> option</code></pre><div class="info"> <code class="code">get t path</code> returns the value at <code class="code">path</code>, or <code class="code">None</code> if there is no value.<br> </div> <pre><span id="VALexists"><span class="keyword">val</span> exists</span> : <code class="type"><a href="Augeas.html#TYPEt">t</a> -> <a href="Augeas.html#TYPEpath">path</a> -> bool</code></pre><div class="info"> <code class="code">exists t path</code> returns true iff there is a value at <code class="code">path</code>.<br> </div> <pre><span id="VALinsert"><span class="keyword">val</span> insert</span> : <code class="type"><a href="Augeas.html#TYPEt">t</a> -> ?before:bool -> <a href="Augeas.html#TYPEpath">path</a> -> string -> unit</code></pre><div class="info"> <code class="code">insert t ?before path label</code> inserts <code class="code">label</code> as a sibling of <code class="code">path</code>. By default it is inserted after <code class="code">path</code>, unless <code class="code">~before:true</code> is specified.<br> </div> <pre><span id="VALrm"><span class="keyword">val</span> rm</span> : <code class="type"><a href="Augeas.html#TYPEt">t</a> -> <a href="Augeas.html#TYPEpath">path</a> -> int</code></pre><div class="info"> <code class="code">rm t path</code> removes all nodes matching <code class="code">path</code>. <p> Returns the number of nodes removed (which may be 0).<br> </div> <pre><span id="VALmatches"><span class="keyword">val</span> matches</span> : <code class="type"><a href="Augeas.html#TYPEt">t</a> -> <a href="Augeas.html#TYPEpath">path</a> -> <a href="Augeas.html#TYPEpath">path</a> list</code></pre><div class="info"> <code class="code">matches t path</code> returns a list of path expressions of all nodes matching <code class="code">path</code>.<br> </div> <pre><span id="VALcount_matches"><span class="keyword">val</span> count_matches</span> : <code class="type"><a href="Augeas.html#TYPEt">t</a> -> <a href="Augeas.html#TYPEpath">path</a> -> int</code></pre><div class="info"> <code class="code">count_matches t path</code> counts the number of nodes matching <code class="code">path</code> but does not return them (see <a href="Augeas.html#VALmatches"><code class="code">Augeas.matches</code></a>).<br> </div> <pre><span id="VALsave"><span class="keyword">val</span> save</span> : <code class="type"><a href="Augeas.html#TYPEt">t</a> -> unit</code></pre><div class="info"> <code class="code">save t</code> saves all pending changes to disk.<br> </div> </body></html>