Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (29 sloc) 869 Bytes
layout title published tags
default
changedbefore
true
reference
files functions
functions
changedbefore

[%CFEngine_function_prototype(newer,older)%]

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).

[%CFEngine_function_attributes(newer, older)%]

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";
    }

See Also: accessedbefore(), isnewerthan()

You can’t perform that action at this time.