/**
  * Removes all files from the Google Drive and clears the caching table
  * @since 1.0
  * @global wpdb $wpdb
  */
 public function empty_google_drive()
 {
     if (!isset($_REQUEST['action'])) {
         return;
     }
     if ('empty_google_drive' != $_REQUEST['action']) {
         return;
     }
     // Check nonces
     if (!isset($_REQUEST['wpbgdc_nonce'])) {
         return;
     }
     if (!wp_verify_nonce($_REQUEST['wpbgdc_nonce'], 'wpbgdc_empty_google_drive')) {
         return;
     }
     global $wpdb;
     if ($wpdb instanceof wpdb) {
         $wpdb->query('TRUNCATE TABLE `' . $wpdb->prefix . 'wpbgdc_files`');
     }
     $helper = new WPB_Google_Drive_Cdn_Service_Helper($this);
     // delete the folder and all its files
     $helper->delete_folder();
     // recreate the folder
     $helper->create_folder();
     wp_redirect(admin_url('options-general.php?page=wpbgdc') . '&notice=removed_files');
 }