Skip to content

Commit

Permalink
Merge pull request #23 from Koenvh1/prefix-delimiter
Browse files Browse the repository at this point in the history
Add support for prefix and delimiter for listFiles()
  • Loading branch information
mhetreramesh authored Jan 13, 2019
2 parents 7afde30 + eb12893 commit af9122e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ public function listFiles(array $options)

$nextFileName = null;
$maxFileCount = 1000;

$prefix = isset($options['Prefix']) ? $options['Prefix'] : '';
$delimiter = isset($options['Delimiter']) ? $options['Delimiter'] : null;

$files = [];

if (!isset($options['BucketId']) && isset($options['BucketName'])) {
Expand All @@ -328,6 +332,8 @@ public function listFiles(array $options)
'bucketId' => $options['BucketId'],
'startFileName' => $nextFileName,
'maxFileCount' => $maxFileCount,
'prefix' => $prefix,
'delimiter' => $delimiter,
],
]);

Expand Down

0 comments on commit af9122e

Please # to comment.