/** * Get the source path for the module * * @param string $serviceName * @return string */ protected function getSourcePath($serviceName) { $sourcePath = $this->modules->getRestPath($this->module, $this->moduleEntity->getLatestVersion(), $serviceName); if (!file_exists($sourcePath)) { mkdir($sourcePath, 0775, true); } return $sourcePath; }