$filter = new \RecursiveCallbackFilterIterator($directory, function ($current) {
/** @var \SplFileInfo $current */
$filename = $current->getFilename();
- if ($filename[0] === '.') {
+ if ($filename[0] === '.' && $filename !== '.gitignore' && $filename !== '.htaccess') {
// ignore dot files and files/directories starting with a dot
return false;
}
$filter = new \RecursiveCallbackFilterIterator($directory, function ($current) {
/** @var \SplFileInfo $current */
$filename = $current->getFilename();
- if ($filename[0] === '.') {
+ if ($filename[0] === '.' && $filename !== '.gitignore' && $filename !== '.htaccess') {
// ignore dot files and files/directories starting with a dot
return false;
}