开发者

List only the first level of files in jets3t

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜