function DummyExternalReadOnlyWrapper::dirname

Same name and namespace in other branches
  1. 10 core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php \Drupal\file_test\StreamWrapper\DummyExternalReadOnlyWrapper::dirname()
  2. 11.x core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php \Drupal\file_test\StreamWrapper\DummyExternalReadOnlyWrapper::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.

Overrides StreamWrapperInterface::dirname

File

core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php, line 54

Class

DummyExternalReadOnlyWrapper
Helper class for testing the stream wrapper registry.

Namespace

Drupal\file_test\StreamWrapper

Code

public function dirname($uri = NULL) {
    return FALSE;
}

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