public function BaseFileCacheTest::tearDown in Plug 7
File
- lib/
doctrine/ cache/ tests/ Doctrine/ Tests/ Common/ Cache/ BaseFileCacheTest.php, line 19
Class
Namespace
Doctrine\Tests\Common\CacheCode
public function tearDown() {
if (!is_dir($this->directory)) {
return;
}
$iterator = new RecursiveDirectoryIterator($this->directory);
foreach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file) {
if ($file
->isFile()) {
@unlink($file
->getRealPath());
}
elseif ($file
->isDir()) {
@rmdir($file
->getRealPath());
}
}
}