<div dir="ltr">Good day,<br><br>I was thinking about some functionality that would be useful in Augeas (or maybe I don't know that they already exist :) ).<br><br>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)'<br>
<br> pattern("/files/etc/logrotate.d/apache2/rule/file")<br>=> /[^,# \n\t{}]+/<br><br><br>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 :<br>
<br> check("/files/etc/logrotate.d/apache2/rule/file", "afile")<br>=> true<br> check("/files/etc/logrotate.d/apache2/rule/file", "my value")<br>=> false<br><br><br>Raphaël<br>
</div>