public function __construct($mixed, array $acceptedExtensions = array(), \closure $iteratorFactory = null)
{
if ($mixed instanceof \recursiveIterator) {
parent::__construct($mixed);
} else {
parent::__construct(call_user_func($iteratorFactory ?: function ($path) {
return new \recursiveDirectoryIterator($path);
}, (string) $mixed));
}
$this->setAcceptedExtensions($acceptedExtensions);
}