/**
  * 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);
     }
 }
Esempio n. 2
0
 /**
  * Remove all items from the cache.
  *
  * @return void
  */
 public function flush()
 {
     if ($this->files->isDirectory($this->directory)) {
         foreach ($this->files->directories($this->directory) as $directory) {
             $this->files->deleteDirectory($directory);
         }
     }
 }
 /**
  * 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);
     }
 }
Esempio n. 4
0
 /**
  * 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);
     }
 }