Skip to content

Commit

Permalink
Allow showing hidden dot files (#13555)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell authored and taylorotwell committed May 15, 2016
1 parent 5fa3e4e commit 3c8e0cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Illuminate/Filesystem/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,12 @@ public function files($directory)
* Get all of the files from the given directory (recursive).
*
* @param string $directory
* @param bool $hidden
* @return array
*/
public function allFiles($directory)
public function allFiles($directory, $hidden = false)
{
return iterator_to_array(Finder::create()->files()->in($directory), false);
return iterator_to_array(Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory), false);
}

/**
Expand Down

0 comments on commit 3c8e0cf

Please sign in to comment.