Method: COS::Bucket#count_files

Defined in:
lib/cos/bucket.rb

#count_files(path = '') ⇒ Integer

获取文件数

Parameters:

  • (defaults to: '')

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

Returns:

  • 文件数

Raises:

  • 服务端异常返回



127
128
129
130
# File 'lib/cos/bucket.rb', line 127

def count_files(path = '')
  lc = list_count(path)
  lc[:files]
end