private function purgeProject()
{
$path = isset($this->getParseResult()->command->args['path']) ? $this->getParseResult()->command->args['path'] : \getcwd() . '/.phrozn';
if (!$this->isAbsolute($path)) {
// not an absolute path
$path = realpath(\getcwd() . '/./' . $path);
}
$config = $this->getConfig();
$this->out($this->getHeader());
$this->out("Purging project data..");
$this->out("\nLocated project folder: {$path}");
$this->out("Project folder is to be removed.\n" . "This operation %rCAN NOT%n be undone.\n");
if (!$path || is_dir($path) === false) {
throw new \RuntimeException("No project found at \"{$path}\"");
}
if ($this->readLine() === 'yes') {
`rm -rf {$path}`;
$this->out(self::STATUS_DELETED . " {$path}");
} else {
$this->out(self::STATUS_FAIL . " Aborted..");
}
$this->out($this->getFooter());
}