function StreamWrapperInterface::dirname

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/StreamWrapper/StreamWrapperInterface.php \Drupal\Core\StreamWrapper\StreamWrapperInterface::dirname()
  2. 8.9.x core/lib/Drupal/Core/StreamWrapper/StreamWrapperInterface.php \Drupal\Core\StreamWrapper\StreamWrapperInterface::dirname()
  3. 10 core/lib/Drupal/Core/StreamWrapper/StreamWrapperInterface.php \Drupal\Core\StreamWrapper\StreamWrapperInterface::dirname()

Gets the name of the directory from a given path.

This method is usually accessed through \Drupal\Core\File\FileSystemInterface::dirname(), which wraps around the normal PHP dirname() function, which does not support stream wrappers.

Parameters

string $uri: An optional URI.

Return value

string A string containing the directory name, or FALSE if not applicable.

See also

\Drupal\Core\File\FileSystemInterface::dirname()

2 methods override StreamWrapperInterface::dirname()
DummyExternalReadOnlyWrapper::dirname in core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php
Gets the name of the directory from a given path.
LocalStream::dirname in core/lib/Drupal/Core/StreamWrapper/LocalStream.php
Gets the name of the directory from a given path.

File

core/lib/Drupal/Core/StreamWrapper/StreamWrapperInterface.php, line 183

Class

StreamWrapperInterface
Defines a Drupal stream wrapper extension.

Namespace

Drupal\Core\StreamWrapper

Code

public function dirname($uri = NULL);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.