protected function getPath($composer, $key, $default)
{
$extra = $composer->extra ? $composer->extra->fof : false;
$default_path = $extra && $extra->paths && $extra->paths->{$key} ? $extra->paths->{$key} : $default;
// Keep asking while the path is not valid
$path = false;
$this->out("Location of " . $key . " files: [" . $default_path . "]");
$path = $this->in();
// Use the default path if needbe
if (empty($path)) {
$path = $default_path;
}
// Create the directory if necessary
if (!is_dir($path)) {
\JFolder::create(getcwd() . '/' . $path);
}
return $path;
}