Method: QcloudCos::ConvenientApi#count
- Defined in:
- lib/qcloud_cos/convenient_api.rb
permalink #count(path = '/', options = {}) ⇒ Hash
返回该路径下文件和文件夹的数目
25 26 27 28 29 30 31 |
# File 'lib/qcloud_cos/convenient_api.rb', line 25 def count(path = '/', = {}) result = list_folders(path, .merge(num: 1)) { folder_count: result.dircount || 0, file_count: result.filecount || 0 } end |