static int loadTree(augeas* augeasHandle, const char *lensPath, char *content) { aug_set (augeasHandle, AUGEAS_CONTENT_ROOT, content); return aug_text_store (augeasHandle, lensPath, AUGEAS_CONTENT_ROOT, AUGEAS_TREE_ROOT); }
/* * call-seq: * text_store(LENS, NODE, PATH) -> boolean * * Use the value of node NODE as a string and transform it into a tree * using the lens LENS and store it in the tree at PATH, which will be * overwritten. PATH and NODE are path expressions. */ VALUE augeas_text_store(VALUE s, VALUE lens, VALUE node, VALUE path) { augeas *aug = aug_handle(s); const char *clens = StringValueCStr(lens); const char *cnode = StringValueCStr(node); const char *cpath = StringValueCStr(path); int r = aug_text_store(aug, clens, cnode, cpath); return (r < 0) ? Qfalse : Qtrue; }