private function prepareInstallationDirectory($directory)
    {
        if (!$this->files->exists($directory)) {
            $this->files->makeDirectory($directory . DIRECTORY_SEPARATOR, 0755, true);

            return;
        }

        $this->files->deleteDirectory($directory, true);
        $this->checkInstallationDirectory($directory);
    }
private function prepareInstallationDirectory($directory)
    {
        if (!$this->files->exists($directory)) {
            $this->files->makeDirectory($directory . DIRECTORY_SEPARATOR, 0755, true);

            return;
        }

        $this->files->deleteDirectory($directory, true);
        $this->checkInstallationDirectory($directory);
    }
private function prepareInstallationDirectory ( $ directory ) { if ( ! $ this -> files -> exists ( $ directory ) ) { $ this -> files -> makeDirectory ( $ directory . DIRECTORY_SEPARATOR , 0755 , true ) ; return ; } $ this -> files -> deleteDirectory ( $ directory , true ) ; $ this -> checkInstallationDirectory ( $ directory ) ; }
Prepares the installation directory.

This method will create the directory if it does
not exist and will ensure that the directory is
empty if it does.

@param $directory
Prepares the installation directory .