Sha256: 67d88cfc0338d7570775317c11764eda7ac8331176df13ad613c38326937c478

Contents?: true

Size: 682 Bytes

Versions: 4

Compression:

Stored size: 682 Bytes

Contents

# frozen_string_literal: true

module Fog
  module Aliyun
    class Storage
      class Real
        # Get headers for object
        #
        # ==== Parameters
        # * object<~String> - Name of object to look for
        #
        def head_object(object, options = {})
          bucket = options[:bucket]
          bucket ||= @aliyun_oss_bucket
          resource = bucket + '/' + object
          ret = request(
            expects: [200, 404],
            method: 'HEAD',
            path: object,
            bucket: bucket,
            resource: resource,
            location: get_bucket_location(bucket)
          )
          ret
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-aliyun-0.3.15 lib/fog/aliyun/requests/storage/head_object.rb
fog-aliyun-0.3.13 lib/fog/aliyun/requests/storage/head_object.rb
fog-aliyun-0.3.12 lib/fog/aliyun/requests/storage/head_object.rb
fog-aliyun-0.3.11 lib/fog/aliyun/requests/storage/head_object.rb