Skip to content

Commit

Permalink
delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
jdmcd committed Jan 1, 2021
1 parent 5b60e42 commit 4eaca6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/S3/Extensions/S3+List.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ extension S3 {
region: Region? = nil,
prefix: String? = nil,
headers: HTTPHeaders,
continuationToken: String? = nil
continuationToken: String? = nil,
delimiter: String? = nil
) throws -> EventLoopFuture<BucketResults> {
let region = region ?? signer.config.region
guard let baseUrl = URL(string: region.hostUrlString(bucket: bucket)), let host = baseUrl.host,
Expand All @@ -32,6 +33,9 @@ extension S3 {
if let prefix = prefix {
components.queryItems?.append(URLQueryItem(name: "prefix", value: prefix))
}
if let delimiter = delimiter {
components.queryItems?.append(URLQueryItem(name: "delimiter", value: delimiter))
}
guard let url = components.url else {
throw S3.Error.invalidUrl
}
Expand Down

0 comments on commit 4eaca6e

Please sign in to comment.