You are here

public function FlysystemFactory::getFilesystem in Flysystem 8

Same name and namespace in other branches
  1. 7 src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::getFilesystem()
  2. 3.x src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::getFilesystem()
  3. 2.0.x src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::getFilesystem()
  4. 3.0.x src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::getFilesystem()

Returns the filesystem for a given scheme.

Parameters

string $scheme: The scheme.

Return value

\League\Flysystem\FilesystemInterface The filesystem for the scheme.

File

src/FlysystemFactory.php, line 118

Class

FlysystemFactory
A factory for Flysystem filesystems.

Namespace

Drupal\flysystem

Code

public function getFilesystem($scheme) {
  if (!isset($this->filesystems[$scheme])) {
    $this->filesystems[$scheme] = new Filesystem($this
      ->getAdapter($scheme));
  }
  return $this->filesystems[$scheme];
}