File: delete_multiple_objects.rb

package info (click to toggle)
ruby-fog-aliyun 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 720 kB
  • sloc: ruby: 5,804; makefile: 6; sh: 3
file content (20 lines) | stat: -rw-r--r-- 578 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Fog
  module Aliyun
    class Storage
      class Real

        # Delete multiple objects from OSS
        #
        # @param bucket_name [String] Name of bucket containing object to delete
        # @param object_names [Array]  Array of object names to delete
        #
        # @see https://help.aliyun.com/document_detail/31983.html

        def delete_multiple_objects(bucket_name, object_names, options = {})
          bucket = @oss_client.get_bucket(bucket_name)
          bucket.batch_delete_objects(object_names, options)
        end
      end
    end
  end
end