Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LocalStream.php

function LocalStream::dirname

Overrides StreamWrapperInterface::dirname

File

core/lib/Drupal/Core/StreamWrapper/LocalStream.php, line 317

Class

LocalStream
Defines a Drupal stream wrapper base class for local files.

Namespace

Drupal\Core\StreamWrapper

Code

public function dirname($uri = NULL) {
    [
        $scheme,
    ] = explode('://', $uri, 2);
    $target = $this->getTarget($uri);
    $dirname = dirname($target);
    if ($dirname == '.') {
        $dirname = '';
    }
    return $scheme . '://' . $dirname;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal