Example #1
0
 public function delete()
 {
     $directoryPath = $this->getDirectoryPath();
     $iterator = new \DirectoryIterator($directoryPath);
     foreach ($iterator as $fileinfo) {
         if ($fileinfo->isDir() && !$fileinfo->isDot()) {
             $file = $directoryPath . $fileinfo->getFilename() . '/' . $this->filename;
             if (is_file($file)) {
                 unlink($file);
             }
         }
     }
     $main_file = $directoryPath . $this->filename;
     if (is_file($main_file)) {
         unlink($main_file);
     }
     parent::delete();
 }
Example #2
0
 public function delete()
 {
     parent::delete();
 }