Movatterモバイル変換


[0]ホーム

URL:


CFEngine documentation homepage

accessedbefore

Suggest changes
Table of contents

Prototype:accessedbefore(newer, older)

Return type:boolean

Description: Compares theatime fields of two files.

Return true ifnewer was accessed beforeolder.

Arguments:

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

Example:

Prepare:

code
touch -a -t '200102031234.56' /tmp/earliertouch -a -t '200202031234.56' /tmp/later

Run:

code
bodycommoncontrol{bundlesequence=>{"example"};}bundleagentexample{classes:"do_it"expression=>accessedbefore("/tmp/earlier","/tmp/later");reports:do_it::"The secret changes have been accessed after the reference time";}

Output:

code
R: The secret changes have been accessed after the reference time

See also:changedbefore(),isnewerthan()

Still need help?

Chat Ask a question on Github Mailing list
Version 
master3.24 (LTS)3.21 (LTS)view all versions

[8]ページ先頭

©2009-2025 Movatter.jp