public static interface DownloadDirectoryRequest.Builder extends CopyableBuilder<DownloadDirectoryRequest.Builder,DownloadDirectoryRequest>
| Modifier and Type | Method and Description |
|---|---|
DownloadDirectoryRequest.Builder |
bucket(String bucket)
The name of the bucket to download objects from.
|
DownloadDirectoryRequest.Builder |
destination(Path destination)
Specifies the destination directory to which files should be downloaded.
|
DownloadDirectoryRequest.Builder |
downloadFileRequestTransformer(Consumer<DownloadFileRequest.Builder> downloadFileRequestTransformer)
Specifies a function used to transform the
DownloadFileRequests generated by this
DownloadDirectoryRequest. |
DownloadDirectoryRequest.Builder |
filter(DownloadFilter filter)
Specifies a filter that will be used to evaluate which objects should be downloaded from the target directory.
|
DownloadDirectoryRequest.Builder |
listObjectsV2RequestTransformer(Consumer<ListObjectsV2Request.Builder> listObjectsV2RequestTransformer)
Specifies a function used to transform the
ListObjectsV2Requests generated by this
DownloadDirectoryRequest. |
copyapplyMutation, buildDownloadDirectoryRequest.Builder destination(Path destination)
destination - the destination directorÏyDownloadDirectoryRequest.Builder bucket(String bucket)
bucket - the bucket nameDownloadDirectoryRequest.Builder filter(DownloadFilter filter)
You can use a filter, for example, to only download objects of a given size, of a given file extension, of a given
last-modified date, etc. See DownloadFilter for some ready-made implementations. Multiple DownloadFilters can be composed together via the and and or methods.
By default, if no filter is specified, all objects will be downloaded.
filter - the filterDownloadFilterDownloadDirectoryRequest.Builder downloadFileRequestTransformer(Consumer<DownloadFileRequest.Builder> downloadFileRequestTransformer)
DownloadFileRequests generated by this
DownloadDirectoryRequest. The provided function is called once for each file that is downloaded, allowing
you to modify the paths resolved by TransferManager on a per-file basis, modify the created GetObjectRequest
before it is passed to S3, or configure a TransferRequestOverrideConfiguration.
The factory receives the DownloadFileRequests created by Transfer Manager for each S3 Object in the
S3 bucket being downloaded and returns a (potentially modified) DownloadFileRequest.
Usage Example:
downloadFileRequestTransformer - A transformer to use for modifying the file-level download requests
before executionDownloadDirectoryRequest.Builder listObjectsV2RequestTransformer(Consumer<ListObjectsV2Request.Builder> listObjectsV2RequestTransformer)
ListObjectsV2Requests generated by this
DownloadDirectoryRequest. The provided function is called once, allowing you to modify
ListObjectsV2Request before it is passed to S3.
The factory receives the ListObjectsV2Requests created by Transfer Manager and
returns a (potentially modified) ListObjectsV2Request.
Usage Example:
Prefix:
ListObjectsV2Request's prefix specifies the key prefix for the virtual directory. If not provided,
all subdirectories will be downloaded recursively
See Organizing objects using prefixes
When a non-empty prefix is provided, the prefix is stripped from the directory structure of the files.
For example, assume that you have the following keys in your bucket:
|- test
|- 2022
|- January
|- sample.jpg
|- February
|- sample1.jpg
|- sample2.jpg
|- sample3.jpg
Delimiter:
ListObjectsV2Request's delimiter specifies the delimiter that will be used to retrieve the objects
within the provided bucket. A delimiter causes a list operation to roll up all the keys that share a common prefix
into a single summary list result. It's null by default.
For example, assume that you have the following keys in your bucket:
|- test
|- sample.jpg
|- photos
|- 2022
|- January
|- sample.jpg
|- February
|- sample1.jpg
|- sample2.jpg
|- sample3.jpg
listObjectsV2RequestTransformer - A transformer to use for modifying ListObjectsV2Request before executionCopyright © 2023. All rights reserved.