/** * Create a workbench directory for the package. * * @param Illuminate\Workbench\Package $package * @param string $path * @return string */ protected function createDirectory(Package $package, $path) { $fullPath = $path . '/' . $package->getFullName(); // If the directory doesn't exist, we will go ahead and create the package // directory in the workbench location. We will use this entire package // name when creating the directory to avoid any potential conflicts. if (!$this->files->isDirectory($fullPath)) { $this->files->makeDirectory($fullPath, 0777, true); return $fullPath; } throw new \InvalidArgumentException("Package exists."); }
/** * Create the destination directory if it doesn't exist. * * @param string $destination * @return void */ protected function makeDestination($destination) { if (!$this->files->isDirectory($destination)) { $this->files->makeDirectory($destination, 0777, true); } }