From 71fe5d511ae567c861111dcbf6d8481467fc0281 Mon Sep 17 00:00:00 2001 From: Paulo Freitas Date: Mon, 21 Jul 2014 23:06:42 -0300 Subject: [PATCH] Fixed AmazonS3->files() implementation --- src/Dmyers/Storage/Adapter/AmazonS3.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Dmyers/Storage/Adapter/AmazonS3.php b/src/Dmyers/Storage/Adapter/AmazonS3.php index f4e6bc7..fa037c1 100644 --- a/src/Dmyers/Storage/Adapter/AmazonS3.php +++ b/src/Dmyers/Storage/Adapter/AmazonS3.php @@ -216,10 +216,18 @@ public function isDirectory($path) */ public function files($path) { - return $this->client->listKeys(array( + $files = array(); + + $iterator = $this->client->getIterator('ListObjects', array( 'Bucket' => $this->bucket, 'Prefix' => $this->computePath($path), )); + + foreach ($iterator as $object) { + $files[] = $object['Key']; + } + + return $files; } /**