/**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $cacheDir = $this->laravel['http_cache.cache_dir'];
     if ($this->files->cleanDirectory($cacheDir)) {
         $this->info('HttpCache cleared!');
     } else {
         $this->error('Could not clear HttpCache');
     }
 }
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $path = public_path(config('asset.public_cache_folder'));
     $fileSystem = new Filesystem();
     $fileSystem->cleanDirectory($path);
     return $this->info("'{$path}' folder cleared. ");
 }
Example #3
0
 /**
  * Deletes all files and folders inside the given path
  *
  * @param string $path
  */
 public function emptyPath($path)
 {
     // Remove all created folders inside output path
     $fs = new Filesystem();
     $fs->cleanDirectory($path);
     // Not all files might have been removed by
     // the delete directory method. Therefore, we
     // search the dir for files and remove those as well.
     $files = $fs->files($path);
     $fs->delete($files);
 }
Example #4
0
 /**
  * Empty the specified directory of all files and folders.
  *
  * @param string $directory
  * @return bool 
  * @static 
  */
 public static function cleanDirectory($directory)
 {
     return \Illuminate\Filesystem\Filesystem::cleanDirectory($directory);
 }
Example #5
0
 public function clear()
 {
     $this->filesystem->cleanDirectory($this->outputDir);
 }
Example #6
0
 /**
  * Clear compiled schema.
  *
  * @return void
  */
 public function clearCompiled()
 {
     if ($this->file->isDirectory($this->basePath)) {
         $this->file->cleanDirectory($this->basePath);
     }
 }
Example #7
0
 /**
  * Clean model directory.
  *
  * @return void
  */
 public function clean()
 {
     if ($this->files->exists($this->path)) {
         $this->files->cleanDirectory($this->path);
     }
 }