Prototype: isplain(filename)

Return type: boolean

Description: Returns whether the named object filename is a plain/regular file.

Arguments:

  • filename: string - File object name - in the range: "?(/.*)

Example:

code
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:

code
R: /etc/passwd is plain..
R: / is not plain..

See also: fileexists(), filestat(), isdir(), islink(), returnszero()