_update_manager_cache_directory

function _update_manager_cache_directory

_update_manager_cache_directory($create = TRUE)

Returns the directory where update archive files should be cached.

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 cached.

File

modules/update/update.module, line 943
Handles updates of Drupal core and contributed projects.

Code

function _update_manager_cache_directory($create = TRUE) {
  $directory = &drupal_static(__FUNCTION__, '');
  if (empty($directory)) {
    $directory = 'temporary://update-cache-' . _update_manager_unique_identifier();
    if ($create && !file_exists($directory)) {
      mkdir($directory);
    }
  }
  return $directory;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!update!update.module/function/_update_manager_cache_directory/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部