function FileSystemInterface::basename

Gets the filename from a given path.

PHP's basename() does not properly support streams or filenames beginning with a non-US-ASCII character.

Deprecated

in drupal:11.3.0 and is removed from drupal:13.0.0. Use PHP native basename() instead.

See also

http://bugs.php.net/bug.php?id=37738

basename()

https://www.drupal.org/node/3530869

Related topics

1 method overrides FileSystemInterface::basename()
FileSystem::basename in core/lib/Drupal/Core/File/FileSystem.php
Gets the filename from a given path.

File

core/lib/Drupal/Core/File/FileSystemInterface.php, line 192

Class

FileSystemInterface
Provides an interface for helpers that operate on files and stream wrappers.

Namespace

Drupal\Core\File

Code

public function basename($uri, $suffix = NULL);

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