You are here

private function ClassMapGeneratorTest::clean in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/class-loader/Tests/ClassMapGeneratorTest.php \Symfony\Component\ClassLoader\Tests\ClassMapGeneratorTest::clean()

Parameters

string $file:

1 call to ClassMapGeneratorTest::clean()
ClassMapGeneratorTest::testDump in vendor/symfony/class-loader/Tests/ClassMapGeneratorTest.php
@dataProvider getTestCreateMapTests

File

vendor/symfony/class-loader/Tests/ClassMapGeneratorTest.php, line 33

Class

ClassMapGeneratorTest

Namespace

Symfony\Component\ClassLoader\Tests

Code

private function clean($file) {
  if (is_dir($file) && !is_link($file)) {
    $dir = new \FilesystemIterator($file);
    foreach ($dir as $childFile) {
      $this
        ->clean($childFile);
    }
    rmdir($file);
  }
  else {
    unlink($file);
  }
}