original_string: public function delete_component_files($component) {
          global $DB;
  
          $filerecords = $DB->get_recordset('files', array('component' => $component));
          foreach ($filerecords as $filerecord) {
              $this->get_file_instance($filerecord)->delete();
          }
          $filerecords->close();
      }
code: public function delete_component_files($component) {
          global $DB;
  
          $filerecords = $DB->get_recordset('files', array('component' => $component));
          foreach ($filerecords as $filerecord) {
              $this->get_file_instance($filerecord)->delete();
          }
          $filerecords->close();
      }
code_tokens: public function delete_component_files ( $ component ) { global $ DB ; $ filerecords = $ DB -> get_recordset ( 'files' , array ( 'component' => $ component ) ) ; foreach ( $ filerecords as $ filerecord ) { $ this -> get_file_instance ( $ filerecord ) -> delete ( ) ; } $ filerecords -> close ( ) ; }
docstring: Delete all files associated with the given component.
  
  @param string $component the component owning the file
docstring_tokens: Delete all files associated with the given component .