function FileProfilerStorage::purge
Overrides ProfilerStorageInterface::purge
File
-
vendor/
symfony/ http-kernel/ Profiler/ FileProfilerStorage.php, line 108
Class
- FileProfilerStorage
- Storage for profiler using files.
Namespace
Symfony\Component\HttpKernel\ProfilerCode
public function purge() : void {
$flags = \FilesystemIterator::SKIP_DOTS;
$iterator = new \RecursiveDirectoryIterator($this->folder, $flags);
$iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST);
foreach ($iterator as $file) {
if (is_file($file)) {
unlink($file);
}
else {
rmdir($file);
}
}
}