I am using jets3t to list the files on one of our buckets. And I noticed it returns everything. I would like to traverse the bucket by directory instead of it getting it all at once, It would take too long, so I am curious is there a way to only get the files on the first level?
For example:
\Bin
-\file1.txt -\folder1 ----\file2.txt开发者_开发问答so basically get the file1.txt and folder1 object but not go deeper and get file2.txt which is in folder1.
http://jets3t.s3.amazonaws.com/api/org/jets3t/service/S3Service.html#listObjects%28java.lang.String,%20java.lang.String,%20java.lang.String%29
the S3Service method above accepts a bucket name as well as a prefix and a delimiter to narrow your return results.
精彩评论