X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c4fa80c6ed2445e1e384455944eb6c4108906cad..3280e2dc5fd16dca63c389b931658d4420faabaf:/sdk/ruby/lib/arvados/keep.rb diff --git a/sdk/ruby/lib/arvados/keep.rb b/sdk/ruby/lib/arvados/keep.rb index ede40c3fc2..e4f62083b0 100644 --- a/sdk/ruby/lib/arvados/keep.rb +++ b/sdk/ruby/lib/arvados/keep.rb @@ -191,6 +191,11 @@ module Keep seen_files.size end + def files_size + # Return the total size of all files in this manifest. + files.reduce(0) { |total, (_, _, size)| total + size } + end + def exact_file_count?(want_count) files_count(want_count + 1) == want_count end