You are here

function hacked_release_form_path_name in Hacked! 6

Same name and namespace in other branches
  1. 5 hacked.module \hacked_release_form_path_name()

A standard method of forming the path name of the local copy of a project

3 calls to hacked_release_form_path_name()
hacked_cvs_checkout_release in ./hacked.module
hacked_download_release in ./hacked.module
hacked_release_generate_hashes in ./hacked.module

File

./hacked.module, line 334
The Hacked! module, shows which project have been changed since download.

Code

function hacked_release_form_path_name($type, $name, $version) {
  $dir = file_directory_temp() . "/hacked-cache/{$type}/{$name}";

  // Build the destination folder tree if it doesn't already exists.
  if (!file_check_directory($dir, FILE_CREATE_DIRECTORY) && !mkdir($dir, 0775, TRUE)) {
    watchdog('hacked', 'Failed to create temp directory: %dir', array(
      '%dir' => $dir,
    ), WATCHDOG_ERROR);
    return FALSE;
  }
  return file_create_path(file_directory_temp() . "/hacked-cache/{$type}/{$name}/{$version}");
}