SilverStripe\EnvironmentCheck\Checks\FileAgeCheck

Checks for the maximum age of one or more files or folders.

Useful for files which should be frequently auto-generated,
like static caches, as well as for backup files and folders.
Does NOT check for existence of a file (will silently fail).

Examples:
// Checks that Requirements::combine_files() has regenerated files in the last 24h
EnvironmentCheckSuite::register(
'check',
'FileAgeCheck("' . ASSETS_PATH . '/_combined_files/*.js' . '", "-1 day", '>', " . FileAgeCheck::CHECK_ALL) . "'
);

// Checks that at least one backup folder has been created in the last 24h
EnvironmentCheckSuite::register(
'check',
'FileAgeCheck("' . BASE_PATH . '/../backups/*' . '", "-1 day", '>', " . FileAgeCheck::CHECK_SINGLE) . "'
);