You are here

public function FlysystemFactory::getFilesystem in Flysystem 2.0.x

Same name and namespace in other branches
  1. 8 src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::getFilesystem()
  2. 7 src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::getFilesystem()
  3. 3.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 119

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];
}