```ruby
class ManageIQ::Providers::Amazon::StorageManager::S3::CloudObjectStoreObject < ::CloudObjectStoreObject
  supports :delete do
    unless ext_management_system
      unsupported_reason_add(:delete, _("The Storage Object is not connected to an active %{table}") % {
        :table => ui_lookup(:table => "ext_management_systems")
      })
    end

    unless cloud_object_store_container
      unsupported_reason_add(:delete, _("The Storage Object is not connected to an active %{table}") % {
        :table => ui_lookup(:table => "cloud_object_store_containers")
      })
    end
  end

  def provider_object(connection = nil)
    cloud_object_store_container.provider_object(connection).object(key)
  end

  def raw_delete
    with_provider_object(&:delete)
  end
end
```

Support deletion of S3 folders
user
```ruby
class ManageIQ::Providers::Amazon::StorageManager::S3::CloudObjectStoreObject < ::CloudObjectStoreObject
  supports :delete do
    unless ext_management_system
      unsupported_reason_add(:delete, _("The Storage Object is not connected to an active %{table}") % {
        :table => ui_lookup(:table => "ext_management_systems")
      })
    end

    unless cloud_object_store_container
      unsupported_reason_add(:delete, _("The Storage Object is not connected to an active %{table}") % {
        :table => ui_lookup(:table => "cloud_object_store_containers")
      })
    end
  end

  def provider_object(connection = nil)
    cloud_object_store_container.provider_object(connection).object(key)
  end

  def raw_delete
    if key.end_with? "/" # delete object with subobjects (aka. folder)
      cloud_object_store_container.provider_object.objects(:prefix => key).batch_delete!
    else # delete single object
      with_provider_object(&:delete)
    end
  end
end
```
assistant