You are here

public function FileSystemBackend::removeBin in File Cache 8

Remove a cache bin.

Overrides CacheBackendInterface::removeBin

File

src/Cache/FileSystemBackend.php, line 258

Class

FileSystemBackend
A cache backend that stores cache items as files on the file system.

Namespace

Drupal\filecache\Cache

Code

public function removeBin() {
  $this
    ->doDeleteAll();

  // Remove the folders if they are empty.
  $iterator = $this
    ->getFileSystemIterator();
  if (!$iterator
    ->valid()) {
    $this->fileSystem
      ->rmdir($this->path);
  }
}