1 installer.module _installer_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.

File

core/modules/installer/installer.module, line 288
Handles installation and updates of contributed projects.

Code

function _installer_manager_extract_directory($create = TRUE) {
  $directory = &backdrop_static(__FUNCTION__, '');
  if (empty($directory)) {
    $directory = 'temporary://update-extraction-' . _installer_manager_unique_identifier();
    if ($create && !file_exists($directory)) {
      mkdir($directory);
    }
  }
  return $directory;
}