function _update_manager_extract_directory
Same name in other branches
- 7.x modules/update/update.module \_update_manager_extract_directory()
- 9 core/modules/update/update.module \_update_manager_extract_directory()
- 8.9.x core/modules/update/update.module \_update_manager_extract_directory()
- 10 core/modules/update/update.module \_update_manager_extract_directory()
Returns the directory where update archive files should be extracted.
Parameters
$create: (optional) Whether to attempt to create the directory if it does not already exist. Defaults to TRUE.
Return value
string The full path to the temporary directory where update file archives should be extracted.
5 calls to _update_manager_extract_directory()
- UpdateManagerInstall::submitForm in core/
modules/ update/ src/ Form/ UpdateManagerInstall.php - Form submission handler.
- UpdateMiscTest::testClearDiskCache in core/
modules/ update/ tests/ src/ Functional/ UpdateMiscTest.php - Checks that clearing the disk cache works.
- UpdateReady::submitForm in core/
modules/ update/ src/ Form/ UpdateReady.php - Form submission handler.
- update_clear_update_disk_cache in core/
modules/ update/ update.module - Clears the temporary files and directories based on file age from disk.
- update_manager_batch_project_get in core/
modules/ update/ update.manager.inc - Implements callback_batch_operation().
File
-
core/
modules/ update/ update.module, line 619
Code
function _update_manager_extract_directory($create = TRUE) {
static $directory;
if (!isset($directory)) {
$directory = 'temporary://update-extraction-' . _update_manager_unique_identifier();
if ($create && !file_exists($directory)) {
mkdir($directory);
}
}
return $directory;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.