$paths =
new \
RecursiveIteratorIterator( new \
RecursiveDirectoryIterator(self::
$tmpDir, \RecursiveDirectoryIterator::SKIP_DOTS
),
\RecursiveIteratorIterator::CHILD_FIRST
);
} catch (\UnexpectedValueException
$exception) { // open_basedir restriction in effect
return;
} foreach ($paths as $path) { if ($path->
isDir()) { if ($path->
isLink()) { @
unlink($path);
} else { @
rmdir($path);
} } else { @
unlink($path);
} } } protected static function toAbsolute($files = null
) {