当前位置: 首页>>代码示例>>PHP>>正文


PHP Storage::deleteDirectory方法代码示例

本文整理汇总了PHP中Illuminate\Support\Facades\Storage::deleteDirectory方法的典型用法代码示例。如果您正苦于以下问题:PHP Storage::deleteDirectory方法的具体用法?PHP Storage::deleteDirectory怎么用?PHP Storage::deleteDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Support\Facades\Storage的用法示例。


在下文中一共展示了Storage::deleteDirectory方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handle

 /**
  * Delete the directory with the filename and all files inside
  * Fire FileWasDeleted Event
  *
  */
 public function handle()
 {
     if (Storage::exists($this->getFileDirectory())) {
         Storage::deleteDirectory($this->getFileDirectory());
     }
     event(new FileWasDeleted($this->filename));
 }
开发者ID:phileserver,项目名称:core,代码行数:12,代码来源:DeleteFile.php

示例2: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $this->refreshApplication();
     Storage::deleteDirectory('testing/ahk');
     Storage::deleteDirectory('testing/cms');
     Storage::deleteDirectory('testing/img');
 }
开发者ID:ahk-ch,项目名称:chamb.net,代码行数:8,代码来源:TestCase.php

示例3: deleteFileVer

 public function deleteFileVer($id, $ver)
 {
     $entry = FileRecord::where('id', '=', $id)->firstOrFail();
     Storage::delete($entry->owner_id . $entry->id . $entry->filename . "/" . $ver);
     $files = Storage::allFiles($entry->owner_id . $entry->id . $entry->filename . "/");
     if (count($files) == 0) {
         Storage::deleteDirectory($entry->owner_id . $entry->id . $entry->filename);
         $entry->delete();
     } else {
         if ($ver == $entry->public_version) {
             $last = str_replace($entry->owner_id . $entry->id . $entry->filename . "/", "", end($files));
             $entry->public_version = $last;
             $entry->save();
         }
     }
     return redirect('/');
 }
开发者ID:LarsNorlander,项目名称:documenter,代码行数:17,代码来源:FileController.php

示例4: reset_crawl

 /**
  *
  */
 private function reset_crawl()
 {
     echo $this->state->state_name . " Resetting Crawl ... ";
     $state = snake_case($this->state->state_name);
     $state_code = strtolower($this->state->state_code);
     // Delete Crawl Files
     Storage::delete('sexoffenders/' . $state . '.sql.gz');
     Storage::deleteDirectory('sexoffenders/' . $state, true);
     Storage::deleteDirectory('sexoffenders/_html/' . str_slug($this->state->state_name), true);
     // DB Reset
     if ($this->counties_table) {
         DB::table($state_code . '_counties')->update(['status' => '0']);
     }
     DB::table($state_code . '_offenders')->truncate();
     DB::table($state_code . '_offenses')->truncate();
     if ($this->profiles_table) {
         DB::table($state_code . '_profiles')->truncate();
     }
     //
     echo "State Crawl Refreshed" . PHP_EOL;
     return;
 }
开发者ID:kirantcyquent,项目名称:LaravelOffenders,代码行数:25,代码来源:SexoffendersCrawler.php

示例5: decline

 public function decline($id)
 {
     $entry = Achievements::where('achievement_id', '=', $id)->firstOrFail();
     $file = FileRecord::where('id', $id)->firstOrFail();
     $owner = User::where('id', $file->owner_id)->firstOrFail();
     $data = ['fileName' => $entry->name];
     Mail::queue('mail.hrDeny', $data, function ($message) use(&$owner) {
         $message->to($owner->email, $owner->fname)->subject('Achievement rejected');
     });
     Storage::deleteDirectory($file->owner_id . $file->id . $file->filename);
     $entry->delete();
     $file->delete();
     return redirect('/hr/verify');
 }
开发者ID:LarsNorlander,项目名称:documenter,代码行数:14,代码来源:AchievementController.php

示例6: deleteContent

 /**
  * Delete content
  * @param  string $path path to the content
  * @return bool
  */
 public function deleteContent($path)
 {
     if (is_file(storage_path() . '/app/' . $path)) {
         return Storage::delete($path);
     }
     return Storage::deleteDirectory($path);
 }
开发者ID:mrjuliuss,项目名称:lecter,代码行数:12,代码来源:Lecter.php


注:本文中的Illuminate\Support\Facades\Storage::deleteDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。