Ron D.
Ron D.

Reputation: 3814

Amazon s3 - browse exact directory's files within a bucket in Java

How do I browse an exact directory say "210911" within a bucket, say "bucketName" in java? I need to do so in order to download the files within that directory.

Upvotes: 0

Views: 1325

Answers (1)

Geoff Appleford
Geoff Appleford

Reputation: 18832

Start by using the AWS java sdk

Then you can use the ObjectListing method with ListObjectsRequest to return all the objects in a bucket. If you specify a prefix value (210911/ in your case) you can limit the results to a specific virtual folder.

Upvotes: 1

Related Questions