Method: QcloudCos::ConvenientApi#empty?

Defined in:
lib/qcloud_cos/convenient_api.rb

#empty?(path = '/', options = {}) ⇒ Boolean

判断该路径下是否为空

Parameters:

  • path (String) (defaults to: '/')

    指定路径

  • options (Hash) (defaults to: {})

    额外参数

Options Hash (options):

  • :bucket (String) — default: config.bucket

    指定当前 bucket, 默认是配置里面的 bucket

Returns:

  • (Boolean)
[View source]

40
41
42
# File 'lib/qcloud_cos/convenient_api.rb', line 40

def empty?(path = '/', options = {})
  count(path, options).values.uniq == 0
end