function _update_manager_extract_directory
7.x update.module | _update_manager_extract_directory($create = TRUE) |
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
The full path to the temporary directory where update file archives should be extracted.
4 calls to _update_manager_extract_directory()
- update_clear_update_disk_cache in drupal-7.x/
modules/ update/ update.module - Clears the temporary files and directories based on file age from disk.
- update_manager_batch_project_get in drupal-7.x/
modules/ update/ update.manager.inc - Batch callback: Downloads, unpacks, and verifies a project.
- update_manager_install_form_submit in drupal-7.x/
modules/ update/ update.manager.inc - Form submission handler for update_manager_install_form().
- update_manager_update_ready_form_submit in drupal-7.x/
modules/ update/ update.manager.inc - Form submission handler for update_manager_update_ready_form().
File
- drupal-7.x/
modules/ update/ update.module, line 918 - Handles updates of Drupal core and contributed projects.
Code
function _update_manager_extract_directory($create = TRUE) {
$directory = &drupal_static(__FUNCTION__, '');
if (empty($directory)) {
$directory = 'temporary://update-extraction-' . _update_manager_unique_identifier();
if ($create && !file_exists($directory)) {
mkdir($directory);
}
}
return $directory;
}