Created
April 28, 2009 11:35
-
-
Save rn0/103087 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class BrokenDescrFilter extends FilterIterator { | |
public function __construct(Iterator $iterator) { | |
parent::__construct($iterator); | |
} | |
public function accept() { | |
$file = $this->getInnerIterator()->current(); | |
if($file->getSize() == 18) { | |
return true; | |
} | |
return false; | |
} | |
} | |
$di = new DirectoryIterator('downloads/pronox/descr/'); | |
$di = new BrokenDescrFilter($di); | |
echo '<pre>'; | |
$i = 1; | |
foreach($di as $file) { | |
echo rtrim($file->getFileName(), '.xml') . ', '; | |
if($i % 20 == 0) { | |
echo "\n"; | |
} | |
$i++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment