Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function run() |
||
31 | { |
||
32 | $files = glob($this->okapiVarDir . '/garmin*.zip'); |
||
33 | foreach ($files as $file) { |
||
34 | // delete old download files after 24 hours; this large interval filters out any |
||
35 | // timezone mismatches in file systems (e.g. on unconventional development environments) |
||
36 | if (is_file($file) && (time() - filemtime($file)) > 24 * 3600) { |
||
37 | unlink($file); |
||
38 | } |
||
39 | } |
||
40 | } |
||
41 | } |
||
42 |