Package com.exasol.bucketfs.list
Class BucketContentLister
- java.lang.Object
-
- com.exasol.bucketfs.list.BucketContentLister
-
public class BucketContentLister extends Object
This class enables to list the contents of a directory in a bucket.
-
-
Constructor Summary
Constructors Constructor Description BucketContentLister(URI bucketUri, ListingRetriever listingRetriever, String readPassword)Create a new instance ofBucketContentLister.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>retrieve(String path, boolean recursive)Retrieve the listing.
-
-
-
Constructor Detail
-
BucketContentLister
public BucketContentLister(URI bucketUri, ListingRetriever listingRetriever, String readPassword)
Create a new instance ofBucketContentLister.- Parameters:
bucketUri- URI of bucket to list contents forlistingRetriever- used to retrieve the raw listingreadPassword- password for reading non-public buckets, not relevant for public buckets
-
-
Method Detail
-
retrieve
public List<String> retrieve(String path, boolean recursive) throws BucketAccessException
Retrieve the listing.- Parameters:
path- path to list the contents ofrecursive-trueif result should include entries in subdirectories of the specified path, too- Returns:
- list of files and subdirectories
- Throws:
BucketAccessException- in case of errors during retrieval of the inventory
-
-