You are here

public function FlysystemBridge::dirname in Flysystem 7

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

File

src/FlysystemBridge.php, line 65
Contains \Drupal\flysystem\FlysystemBridge.

Class

FlysystemBridge
An adapter for Flysystem to \DrupalStreamWrapperInterface.

Namespace

Drupal\flysystem

Code

public function dirname($uri = NULL) {
  if (!isset($uri)) {
    $uri = $this->uri;
  }
  list($scheme, $target) = explode('://', $uri, 2);
  return $scheme . '://' . ltrim(Util::dirname($target), '\\/');
}