You are here

function hacked_release_form_path_name in Hacked! 5

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

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

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

File

./hacked.module, line 338
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}");
}