You are here

public function FormUploadedFile::getRealPath in Drupal 10

Gets the absolute path to the file.

Return value

string|false The path to the file, or FALSE if the file does not exist.

Overrides UploadedFileInterface::getRealPath

See also

https://php.net/manual/en/splfileinfo.getrealpath.php

File

core/modules/file/src/Upload/FormUploadedFile.php, line 67

Class

FormUploadedFile
Provides a bridge to Symfony UploadedFile.

Namespace

Drupal\file\Upload

Code

public function getRealPath() {
  return $this->uploadedFile
    ->getRealPath();
}