function FileSystemInterface::basename

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\FileSystemInterface::basename()
  2. 8.9.x core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\FileSystemInterface::basename()
  3. 11.x core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\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.

See also

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

basename()

Related topics

File

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

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.