當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Filesystem::cleanDirectory方法代碼示例

本文整理匯總了PHP中Illuminate\Filesystem\Filesystem::cleanDirectory方法的典型用法代碼示例。如果您正苦於以下問題:PHP Filesystem::cleanDirectory方法的具體用法?PHP Filesystem::cleanDirectory怎麽用?PHP Filesystem::cleanDirectory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Filesystem\Filesystem的用法示例。


在下文中一共展示了Filesystem::cleanDirectory方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: fire

 /**
  * 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');
     }
 }
開發者ID:okaufmann,項目名稱:laravel-httpcache,代碼行數:14,代碼來源:ClearCommand.php

示例2: handle

 /**
  * 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. ");
 }
開發者ID:p3ym4n,項目名稱:laravel-asset-manager,代碼行數:12,代碼來源:AssetClearCommand.php

示例3: emptyPath

 /**
  * 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);
 }
開發者ID:aedart,項目名稱:scaffold,代碼行數:16,代碼來源:OutputPath.php

示例4: cleanDirectory

 /**
  * 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);
 }
開發者ID:satriashp,項目名稱:tour,代碼行數:11,代碼來源:_ide_helper.php

示例5: clear

 public function clear()
 {
     $this->filesystem->cleanDirectory($this->outputDir);
 }
開發者ID:radmen,項目名稱:lassy,代碼行數:4,代碼來源:Cleaner.php

示例6: clearCompiled

 /**
  * Clear compiled schema.
  *
  * @return void
  */
 public function clearCompiled()
 {
     if ($this->file->isDirectory($this->basePath)) {
         $this->file->cleanDirectory($this->basePath);
     }
 }
開發者ID:guratr,項目名稱:cruddy,代碼行數:11,代碼來源:Compiler.php

示例7: clean

 /**
  * Clean model directory.
  *
  * @return void
  */
 public function clean()
 {
     if ($this->files->exists($this->path)) {
         $this->files->cleanDirectory($this->path);
     }
 }
開發者ID:proai,項目名稱:laravel-datamapper,代碼行數:11,代碼來源:Generator.php


注:本文中的Illuminate\Filesystem\Filesystem::cleanDirectory方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。