protected function _getPaths()
{
$defaultPath = APP;
while (true) {
$currentPaths = count($this->_paths) > 0 ? $this->_paths : ['None'];
$message = sprintf("Current paths: %s\nWhat is the path you would like to extract?\n[Q]uit [D]one", implode(', ', $currentPaths));
$response = $this->in($message, null, $defaultPath);
if (strtoupper($response) === 'Q') {
$this->err('Extract Aborted');
$this->_stop();
return;
}
if (strtoupper($response) === 'D' && count($this->_paths)) {
$this->out();
return;
}
if (strtoupper($response) === 'D') {
$this->warn('No directories selected. Please choose a directory.');
} elseif (is_dir($response)) {
$this->_paths[] = $response;
$defaultPath = 'D';
} else {
$this->err('The directory path you supplied was not found. Please try again.');
}
$this->out();
}
}