You are here

public function FileSystemInterface::getTempDirectory in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\FileSystemInterface::getTempDirectory()
  2. 9 core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\FileSystemInterface::getTempDirectory()

Gets the path of the configured temporary directory.

If the path is not set, it will fall back to the OS-specific default if set, otherwise a directory under the public files directory. It will then set this as the configured directory.

Return value

string A string containing the path to the temporary directory.

File

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

Class

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

Namespace

Drupal\Core\File

Code

public function getTempDirectory();