protected function File::getName

Returns locale independent base name of the given path.

Parameters

string $name The new file name:

Return value

string containing

2 calls to File::getName()
File::getTargetFile in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php
UploadedFile::__construct in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php
Accepts the information of the uploaded file as provided by the PHP global $_FILES.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php, line 152

Class

File
A file in the file system.

Namespace

Symfony\Component\HttpFoundation\File

Code

protected function getName($name) {
  $originalName = str_replace('\\', '/', $name);
  $pos = strrpos($originalName, '/');
  $originalName = false === $pos ? $originalName : substr($originalName, $pos + 1);
  return $originalName;
}