if (filemtime($file) >= $this->date->getTimestamp()) {
38
return new Result(Result::STATUS_PASS, 'At least one file (name: ' . basename($file) . ', created: ' . date('Y-d-m H:i', filemtime($file)) . ') was created after ' . $this->date->format('Y-m-d H:m') . '.');
39
}
40
}
41
}
42
43
return new Result(Result::STATUS_FAIL, 'No file was found newer than ' . $this->date->format('Y-m-d H:m:s') . '.');
44
}
45
46
/**
47
* @param string $directory the directory where to look for the file
48
* @param \DateTime $date the date the file must be newer than
49
* @param string $pattern if not all files should be analyzed there can be set a filter
50
*/
51
public function init($directory, \DateTime $date, $pattern = '*')