You are here

function apps_installer_has_write_access in Apps 7

Check whether Apps has write access to libraries and modules directories.

Return value

bool If the directory is writeable

3 calls to apps_installer_has_write_access()
apps_install_downloads in ./apps.installer.inc
Move modules from there temp location in to the drupal tree.
apps_install_verify in ./apps.profile.inc
Show instructions and check system services to help guide direction for Apps installs.
apps_profile_install_tasks in ./apps.profile.inc
Add install tasks to profile install tasks.

File

./apps.module, line 527
Module file for Apps

Code

function apps_installer_has_write_access() {
  $install_location = variable_get('apps_install_path', APPS_INSTALL_PATH);

  // Create the directory if possible.
  if (!is_dir($install_location) && !drupal_mkdir($install_location, NULL, TRUE)) {
    return FALSE;
  }
  return is_writable(apps_installer_lib_dir(TRUE)) && is_writable($install_location);
}