[augeas-devel] Transform strings and store/retrieve resulting trees

Francis Giraldeau francis.giraldeau at gmail.com
Thu May 24 20:47:08 UTC 2012


2012/5/22 <lutter at redhat.com>

>
> A while ago, Rich Jones asked on IRC if would be possible to add API calls
> so that strings can directly be transformed and stored in the tree through
> the API. This patch series implements calls to do that.
>
> The two new API functions aug_text_store and aug_text_retrieve can be used
> to produce a tree from a string, respectively a string from a tree.
>
> The prototypes for these functions are
>
>  int aug_text_store(augeas *aug, const char *lens, const char *path,
>                     const char *text, unsigned int text_len);
>  int aug_text_retrieve(struct augeas *aug, const char *lens, const char
> *path,
>                        const char *text_in, unsigned int text_in_len,
>                        char **text_out, unsigned int *text_out_len);
>
> I like this, I think it will be useful for an interactive UI. For example,
if we have two pannels, one with the tree and the other with the text file,
then the text pannel can be updated in case of a change in the tree pannel
without actually saving the file on disk.

Cheers,

Francis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20120524/482e7a5d/attachment.htm>


More information about the augeas-devel mailing list