Code (PHP) pasted on 2018-12-05, 20:33 Raw Source
- jean@asuna:~/Projekte/Image/DuplicateFinder$ php test.php
- /home/jean/Projekte/Image/DuplicateFinder/test.php:36:
- '/home/jean/test/10/01/_.jpg' =>
- [0] =>
- string(34) "/home/jean/test/10/01/100_0067.jpg"
- }
- '/home/jean/test/10/01/100_0065.jpg' =>
- [0] =>
- string(34) "/home/jean/test/09/01/100_0065.jpg"
- [1] =>
- string(34) "/home/jean/test/08/01/100_0065.jpg"
- }
- '/home/jean/test/10/01/100_0068.jpg' =>
- [0] =>
- string(34) "/home/jean/test/09/01/100_0068.jpg"
- [1] =>
- string(34) "/home/jean/test/08/01/100_0068.jpg"
- }
- '/home/jean/test/10/01/100_0067.jpg' =>
- [0] =>
- string(34) "/home/jean/test/09/01/100_0067.jpg"
- [1] =>
- string(34) "/home/jean/test/08/01/100_0067.jpg"
- }
- '/home/jean/test/07/30/bild24.jpg' =>
- [0] =>
- string(36) "/home/jean/test/07/30/f530019248.jpg"
- }
- // ---- snip ----
- foreach($files as $file)
- foreach ($this->finders as $finder) {
- $finderName = $finder->getName();
- $hash = $finder->getHash($file);
- $reference = $this->hashes[$finderName][$hash];
- $this->duplicates[$reference][] = $file;
- break;
- }
- $this->hashes[$finderName][$hash] = $file;
- }