Bolt\Cache::flushDirectory PHP Method

flushDirectory() private method

Helper function for doFlush().
private flushDirectory ( Bolt\Filesystem\Handler\DirectoryInterface $directory )
$directory Bolt\Filesystem\Handler\DirectoryInterface
    private function flushDirectory(DirectoryInterface $directory)
    {
        if (!$directory->exists()) {
            return;
        }
        $files = $directory->find()->ignoreDotFiles()->ignoreVCS();
        /** @var HandlerInterface $file */
        foreach ($files as $file) {
            try {
                $file->delete();
            } catch (IOException $e) {
            }
        }
    }