public function Twig_Environment::clearCacheFiles

Clears the template cache files on the filesystem.

File

drupal/core/vendor/twig/twig/lib/Twig/Environment.php, line 403

Class

Twig_Environment
Stores the Twig configuration.

Code

public function clearCacheFiles() {
  if (false === $this->cache) {
    return;
  }
  foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->cache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
    if ($file
      ->isFile()) {
      @unlink($file
        ->getPathname());
    }
  }
}