JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrgetDestinationFilePath()); if (! $this->laravel['files']->isDirectory($dir = dirname($path))) { $this->laravel['files']->makeDirectory($dir, 0777, true); } $contents = $this->getTemplateContents(); try { $this->components->task("Generating file {$path}", function () use ($path, $contents) { $overwriteFile = $this->hasOption('force') ? $this->option('force') : false; (new FileGenerator($path, $contents))->withFileOverwrite($overwriteFile)->generate(); }); } catch (FileAlreadyExistException $e) { $this->components->error("File : {$path} already exists."); return E_ERROR; } return 0; } /** * Get class name. * * @return string */ public function getClass() { return class_basename($this->argument($this->argumentName)); } /** * Get default namespace. */ public function getDefaultNamespace(): string { return ''; } /** * Get class namespace. * * @param \Nwidart\Modules\Module $module * @return string */ public function getClassNamespace($module) { $path_namespace = $this->path_namespace(str_replace($this->getClass(), '', $this->argument($this->argumentName))); return $this->module_namespace($module->getStudlyName(), $this->getDefaultNamespace().($path_namespace ? '\\'.$path_namespace : '')); } public function module(?string $name = null): Module { return $this->laravel['modules']->findOrFail($name ?? $this->getModuleName()); } }