更新时间:2021-10-07 06:36:34
使用 Bucket#objects
:
bucket.objects({prefix: 'my/folder/'}).limit(1).any?
返回
ObjectSummary
资源的Collection
.没有API请求直到在集合上调用可枚举的方法为止.Client#list_objects
将被多次调用,直到每次ObjectSummary
已产生.
Returns a
Collection
ofObjectSummary
resources. No API requests are made until you call an enumerable method on the collection.Client#list_objects
will be called multiple times until everyObjectSummary
has been yielded.
- http://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Bucket.html#objects-instance_method