public function setupHtaccess()
{
$htaccess = '/.htaccess';
$errors = array();
try {
if ($this->filesystem->exists($this->newscoopDir . $htaccess)) {
$this->filesystem->copy(realpath($this->newscoopDir . $htaccess), realpath($this->newscoopDir) . '/htaccess.bak');
}
} catch (IOException $e) {
$errors[] = $e->getMessage();
return $errors;
}
try {
$this->filesystem->copy(realpath($this->newscoopDir . '/htaccess.dist'), realpath($this->newscoopDir) . $htaccess, true);
} catch (IOException $e) {
$errors[] = $e->getMessage();
}
return $errors;
}