Project

General

Profile

Actions

Feature #12400

closed

arvados.Collection class should be able to calculate collection size

Added by Bryan Cosca over 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
-
Story points:
-

Description

from arvados/sdk/python/arvados/commands/put.py

def _collection_size(self, collection):
"""
Recursively get the total size of the collection
"""
size = 0
for item in listvalues(collection):
if isinstance(item, arvados.collection.Collection) or isinstance(item, arvados.collection.Subcollection):
size += self._collection_size(item)
else:
size += item.size()
return size

This returns the collection size, there should be a method in the Collection class that does the same thing.

Actions #1

Updated by Peter Amstutz about 4 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF