prepareInstallDirectory example

// Take a Backup.       if ($args['make_backup']) {
        $this->makeBackup($filetransfer$args['install_dir']$args['backup_dir']);
      }

      if (!$this->name) {
        // This is bad, don't want to delete the install directory.         throw new UpdaterException('Fatal error in update, cowardly refusing to wipe out the install directory.');
      }

      // Make sure the installation parent directory exists and is writable.       $this->prepareInstallDirectory($filetransfer$args['install_dir']);

      if (is_dir($args['install_dir'] . '/' . $this->name)) {
        // Remove the existing installed file.         $filetransfer->removeDirectory($args['install_dir'] . '/' . $this->name);
      }

      // Copy the directory in place.       $filetransfer->copyDirectory($this->source, $args['install_dir']);

      // Make sure what we just installed is readable by the web server.       $this->makeWorldReadable($filetransfer$args['install_dir'] . '/' . $this->name);

      
Home | Imprint | This part of the site doesn't use cookies.