public FileSystem::dirname($uri)
Gets the name of the directory from a given path.
PHP's dirname() does not properly pass streams, so this function fills that gap. It is backwards compatible with normal paths and will use PHP's dirname() as a fallback.
Compatibility: normal paths and stream wrappers.
string $uri: A URI or path.
string A string containing the directory name.
Overrides FileSystemInterface::dirname
dirname()
https://www.drupal.org/node/515192
public function dirname($uri) { $scheme = $this->uriScheme($uri); if ($this->validScheme($scheme)) { return $this->streamWrapperManager->getViaScheme($scheme)->dirname($uri); } else { return dirname($uri); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!File!FileSystem.php/function/FileSystem::dirname/8.1.x