当前位置: 首页>>代码示例>>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;未经允许,请勿转载。