當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。