qoobaa / s3

Library for accessing S3 objects and buckets, supports EU and US buckets
MIT License
258 stars 112 forks source link

Add a feature to query subfolders (or path prefix) #78

Closed suhastech closed 11 years ago

suhastech commented 11 years ago

I think this should work. I haven't written tests for now.

Let me know what you think.

Regards, Suhas

qoobaa commented 11 years ago

Thanks for your PR. I'm thinking what to do with that. Do you think it's possible to make it more general? Is there an API call for listing objects with a common "suffix", etc.?

suhastech commented 11 years ago

Hmm.. I don't think S3 has an API explicitly for that.

By "suffix", I guess you'd want to find the objects with same filenames (or ending path)? I'm wondering what the use case would be to make such a query.

PS: I found this at: http://amazon.rubyforge.org/doc/classes/AWS/S3/Bucket.html#M000069

qoobaa commented 11 years ago

Ok.

It'd be much better to add a hash parameter to "objects" method instead of creating a new method for every param that API supports. Could you implement that?

suhastech commented 11 years ago

This should do?

suhastech commented 11 years ago

Done.

raine commented 10 years ago

This feature is not documented.

http://rubydoc.info/github/qoobaa/s3/master/S3/Bucket:objects

- (Object) objects
qoobaa commented 10 years ago

True.