Add MediaFilesIterator
Add a simple utility class that can be used to find media files (video and archives) from a directory tree.
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class DownloadDispatcher_Utility_MediaFilesIterator extends FilterIterator {
|
||||||
|
public function accept() {
|
||||||
|
return preg_match('/(?<!\.sample)\.(?:avi|ogm|m4v|mkv|mov|mp4|mpg|srt|rar)$/i', $this->current()->getFilename());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user