/**
  * Handle the command.
  *
  * @return string
  */
 public function handle(Filesystem $files)
 {
     /* Create addon folder */
     $files->makeDirectory($this->dist, 0755, true, true);
     /* Copy/parse Builder's template files */
     $files->parseDirectory($this->src . '/template', $this->dist . '/', $this->context);
     return $this->dist;
 }
Пример #2
0
 /**
  * Get the Builder storage path (create if it doesn't exist).
  *
  * @param string path,
  *
  * @return string
  */
 protected function getBuilderPath($path = '')
 {
     $path = $this->application->getStoragePath(_config('config.path') . ($path ? "/{$path}" : ''));
     /* make sure the parent folder is a directory or parent directory is a folder */
     if (!$this->files->isDirectory($parent = dirname($path))) {
         $this->files->makeDirectory($parent, 0777, true);
     }
     return $path;
 }