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

Commit

Permalink
Merge pull request #9 from paulofreitas/patch-1
Browse files Browse the repository at this point in the history
Fixed files method in AmazonS3 adapter
  • Loading branch information
dmyers committed Aug 5, 2014
2 parents 6038db5 + 71fe5d5 commit e00f752
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Dmyers/Storage/Adapter/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit e00f752

Please sign in to comment.