Good day,

I was thinking about some functionality that would be useful in Augeas (or
maybe I don't know that they already exist :) ).

It might be useful for developers using the Augeas API to access the pattern
that Augeas is considering for values. For example, if a dev created a
graphical interface using Augeas, they might want to check the values
provided by users against the regexp describing these values. Such a
function could have a syntax like 'pattern(path)'

 pattern("/files/etc/logrotate.d/apache2/rule/file")
=> /[^,# \n\t{}]+/


This kind of check could also be performed internally by Augeas on request
through the API, using a check(path, value) function similar to set :

 check("/files/etc/logrotate.d/apache2/rule/file", "afile")
=> true
 check("/files/etc/logrotate.d/apache2/rule/file", "my value")
=> false


Raphaël
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to