public function FileSystem::dirname in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/File/FileSystem.php \Drupal\Core\File\FileSystem::dirname()
- 9 core/lib/Drupal/Core/File/FileSystem.php \Drupal\Core\File\FileSystem::dirname()
File
- core/
lib/ Drupal/ Core/ File/ FileSystem.php, line 145
Class
- FileSystem
- Provides helpers to operate on files and stream wrappers.
Namespace
Drupal\Core\FileCode
public function dirname($uri) {
$scheme = StreamWrapperManager::getScheme($uri);
if ($this->streamWrapperManager
->isValidScheme($scheme)) {
return $this->streamWrapperManager
->getViaScheme($scheme)
->dirname($uri);
}
else {
return dirname($uri);
}
}