Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1020 Bytes

changedbefore.markdown

File metadata and controls

47 lines (33 loc) · 1020 Bytes
layout title categories published alias tags
default
changedbefore
Reference
Functions
changedbefore
true
reference-functions-changedbefore.html
reference
files functions
functions
changedbefore

Prototype: changedbefore(newer, older)

Return type: class

Description: Compares the ctime fields of two files.

Returns true if newer was changed before older, otherwise returns false.

Change times include both file permissions and file contents. Comparisons like this are normally used for updating files (like the 'make' command).

Arguments:

  • newer : Newer filename, in the range "?(/.*)
  • older : Older filename, in the range "?(/.*)

Example:

    body common control
    {
      bundlesequence  => { "example" };
    }

    bundle agent example
    {     
      classes:

        "do_it" and => { changedbefore("/tmp/earlier","/tmp/later"), "linux" }; 

      reports:

        do_it::

          "The derived file needs updating";
    }