/** * Create the directory for the controller. * * @param string $controller * @param string $path * @return void */ protected function makeDirectory($controller, $path) { $directory = $this->getDirectory($controller); if (!$this->files->isDirectory($full = $path . DS . $directory)) { $this->files->makeDirectory($full, 0777, true); } }
/** * Create the file cache directory if necessary. * * @param string $path * @return void */ protected function createCacheDirectory($path) { try { $this->files->makeDirectory(dirname($path), 0777, true, true); } catch (\Exception $e) { // } }
/** * Generate defined module folders. */ protected function generateFolders() { $slug = $this->container['slug']; // $path = $this->module->getPath(); if (!$this->files->isDirectory($path)) { $this->files->makeDirectory($path); } $path = $this->getModulePath($slug, true); $this->files->makeDirectory($path); // $modulePath = $this->getModulePath($slug); // Generate the Module directories. foreach ($this->moduleFolders as $folder) { $path = $modulePath . $folder; $this->files->makeDirectory($path); } // Generate the Language inner directories. $languageFolders = $this->getLanguagePaths($slug); foreach ($languageFolders as $folder) { $path = $modulePath . $folder; $this->files->makeDirectory($path); } }
/** * Build the directory for the class if necessary. * * @param string $path * * @return string */ protected function makeDirectory($path) { if (!$this->files->isDirectory(dirname($path))) { $this->files->makeDirectory(dirname($path), 0777, true, true); } }