/** * Copy all the files to /socket * * @param string $path * @return bool */ protected function copyFiles($path) { if (!$this->files->isDirectory($path)) { return $this->files->copyDirectory(__DIR__ . '/stubs', $path); } return false; }
/** * 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."); }