You are here

function _responsive_favicons_extract_directory in Responsive Favicons 7

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.

1 call to _responsive_favicons_extract_directory()
responsive_favicons_config_page_submit in ./responsive_favicons.admin.inc
Implements additional submit logic for responsive_favicons_settings_form().

File

./responsive_favicons.admin.inc, line 160
Admin page callbacks for the responsive_favicons module.

Code

function _responsive_favicons_extract_directory($create = TRUE) {
  $directory =& drupal_static(__FUNCTION__, '');
  if (empty($directory)) {
    $directory = 'temporary://responsive-favicons .' . _responsive_favicons_unique_identifier();
    if ($create && !file_exists($directory)) {
      mkdir($directory);
    }
  }
  return $directory;
}