Table of Contents
isplain
Table of Contents
Prototype: isplain(filename)
Return type: boolean
Description: Returns whether the named object filename
is a
plain/regular file.
Arguments:
filename
:string
, in the range:"?(/.*)
Example:
body common control
{
bundlesequence => { "example" };
}
bundle agent example
{
classes:
"fileisplain" expression => isplain("/etc/passwd");
"dirisnotplain" not => isplain("/");
reports:
fileisplain::
"/etc/passwd is plain..";
dirisnotplain::
"/ is not plain..";
}
Output:
R: /etc/passwd is plain..
R: / is not plain..