Skip to content

Commit

Permalink
Merge pull request #26 from brzuchal/master
Browse files Browse the repository at this point in the history
Replaced glob() with FilesystemIterator
  • Loading branch information
jamesmoss authored Jan 31, 2017
2 parents 1600939 + 268d20c commit 869eced
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/JamesMoss/Flywheel/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ public function getFilename($id)
public function getAllFiles()
{
$ext = $this->formatter->getFileExtension();
$files = glob($this->path . DIRECTORY_SEPARATOR . '*.' . $ext);
$filesystemIterator = new \FilesystemIterator($this->path, \FilesystemIterator::SKIP_DOTS);
$files = new \RegexIterator($filesystemIterator, "/\\.{$ext}$/");

return $files;
}
Expand Down

0 comments on commit 869eced

Please sign in to comment.