Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

Commit e00f752

Browse files
committed
Merge pull request #9 from paulofreitas/patch-1
Fixed files method in AmazonS3 adapter
2 parents 6038db5 + 71fe5d5 commit e00f752

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Dmyers/Storage/Adapter/AmazonS3.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,18 @@ public function isDirectory($path)
216216
*/
217217
public function files($path)
218218
{
219-
return $this->client->listKeys(array(
219+
$files = array();
220+
221+
$iterator = $this->client->getIterator('ListObjects', array(
220222
'Bucket' => $this->bucket,
221223
'Prefix' => $this->computePath($path),
222224
));
225+
226+
foreach ($iterator as $object) {
227+
$files[] = $object['Key'];
228+
}
229+
230+
return $files;
223231
}
224232

225233
/**

0 commit comments

Comments
 (0)