4 * This file is part of Twig.
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 class Twig_Tests_FilesystemHelper
14 public static function removeDir($dir)
16 $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, PHP_VERSION_ID < 50300 ? 0 : FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST);
17 foreach ($iterator as $filename => $fileInfo) {
18 if ($iterator->isDot()) {
22 if ($fileInfo->isDir()) {