function file_directory_os_temp in Drupal 8
Discovers a writable system-appropriate temporary directory.
Return value
mixed A string containing the path to the temporary directory.
Deprecated
in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory().
See also
https://www.drupal.org/node/2418133
Related topics
1 call to file_directory_os_temp()
- FileSystemDeprecationTest::testDeprecatedDirectoryOsTemp in core/
tests/ Drupal/ KernelTests/ Core/ File/ FileSystemDeprecationTest.php - @expectedDeprecation file_directory_os_temp() is deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory() instead. See https://www.drupal.org/node/2418133
File
- core/
includes/ file.inc, line 1144 - API for handling file uploads and server file management.
Code
function file_directory_os_temp() {
@trigger_error('file_directory_os_temp() is deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \\Drupal\\Component\\FileSystem\\FileSystem::getOsTemporaryDirectory() instead. See https://www.drupal.org/node/2418133', E_USER_DEPRECATED);
return ComponentFileSystem::getOsTemporaryDirectory();
}