Method: Aliyun::OSS::Bucket#objects
- Defined in:
- lib/aliyun/oss/bucket.rb
#objects(options = {}) ⇒ Object
List OSSObject’s of the bucket.
Once fetched the objects will be cached. You can reload the objects by passing :reload.
bucket.objects(:reload)
You can also filter the objects using the same options listed in Bucket.objects.
bucket.objects(:prefix => 'jazz')
Using these filtering options will implictly reload the objects.
To reclaim all the objects for the bucket you can pass in :reload again.
235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/aliyun/oss/bucket.rb', line 235 def objects( = {}) if .is_a?(Hash) reload = !.empty? else reload = = {} end reload!() if reload || object_cache.empty? object_cache end |