Example #1
0
 function clean_files()
 {
     $videos = new Model_videos();
     foreach ($videos->select_all_by_live_id($this->live['id']) as $video) {
         $filename = $video["filename"];
         $filepath = $this->config["contents_dir"] . "/" . $filename;
         if (file_exists($filepath)) {
             unlink($filepath);
         }
     }
     $filename = $this->live["nicoLiveId"] . ".jpg";
     $filepath = $this->config["contents_dir"] . "/" . $filename;
     if (file_exists($filepath)) {
         unlink($filepath);
     }
     $filename = $this->live["nicoLiveId"] . ".xml";
     $filepath = $this->config["contents_dir"] . "/" . $filename;
     if (file_exists($filepath)) {
         unlink($filepath);
     }
 }