@@ 28-37 (lines=10) @@ | ||
25 | public function read($directory) |
|
26 | { |
|
27 | $hash = ''; |
|
28 | foreach ($this->getFinder() as $file) { |
|
29 | ||
30 | // MD5 hash of the file |
|
31 | $fileHash = md5_file( |
|
32 | $file->getPath() . DIRECTORY_SEPARATOR . $file->getFilename() |
|
33 | ); |
|
34 | ||
35 | // Mix into result hash |
|
36 | $hash = md5($hash . $fileHash); |
|
37 | } |
|
38 | ||
39 | return substr($hash, 0, 6); |
|
40 | } |
@@ 28-37 (lines=10) @@ | ||
25 | public function read($directory) |
|
26 | { |
|
27 | $highest = 0; |
|
28 | foreach ($this->getFinder() as $file) { |
|
29 | ||
30 | $mtime = filemtime( |
|
31 | $file->getPath() |
|
32 | . DIRECTORY_SEPARATOR . $file->getFilename() |
|
33 | ); |
|
34 | if ($mtime > $highest) { |
|
35 | $highest = $mtime; |
|
36 | } |
|
37 | } |
|
38 | ||
39 | return $highest; |
|
40 | } |