public function DrupalCacheAdapter::createDir in Flysystem 8
Same name and namespace in other branches
- 3.x src/Flysystem/Adapter/DrupalCacheAdapter.php \Drupal\flysystem\Flysystem\Adapter\DrupalCacheAdapter::createDir()
- 2.0.x src/Flysystem/Adapter/DrupalCacheAdapter.php \Drupal\flysystem\Flysystem\Adapter\DrupalCacheAdapter::createDir()
- 3.0.x src/Flysystem/Adapter/DrupalCacheAdapter.php \Drupal\flysystem\Flysystem\Adapter\DrupalCacheAdapter::createDir()
File
- src/
Flysystem/ Adapter/ DrupalCacheAdapter.php, line 150
Class
- DrupalCacheAdapter
- A Flysystem adapter implementing caching with Drupal's Cache API.
Namespace
Drupal\flysystem\Flysystem\AdapterCode
public function createDir($dirname, Config $config) {
$metadata = $this->adapter
->createDir($dirname, $config);
// Warm the metadata cache.
if ($metadata) {
$item = new CacheItem();
$item
->updateMetadata($metadata);
$this->cacheItemBackend
->set($dirname, $item);
}
return $metadata;
}