function file_directory_os_temp
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
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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.