Method: COS::Bucket#count

Defined in:
lib/cos/bucket.rb

#count(path = '') ⇒ Integer Also known as: size

获取文件及目录总数

Parameters:

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

    目录路径, 如: ‘path1’, ‘path1/path2’, sdk会补齐末尾的 ‘/’

Returns:

  • (Integer)

    文件及目录总数

Raises:



113
114
115
116
# File 'lib/cos/bucket.rb', line 113

def count(path = '')
  lc = list_count(path)
  lc[:total]
end