Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony Finder ignores files beginning by dot

I am using the Finder for sending spooled e-mails, but automatic name generator puts dots in the filename and sometimes they appear at the beginning of the file.

It seems that the finder can't get files with that name - well those files are hidden... Has anyone experienced that behaviour? Any advice how to use the finder to locate hidden files?

Thx

like image 572
Jarda Avatar asked Jan 24 '14 11:01

Jarda


1 Answers

Just set ignoreDotFiles to false.

$finder = new Finder();
$finder->files()->ignoreDotFiles(false)->in('directory');

For .git files, set ignoreVCS to false

$finder->files()
    ->ignoreVCS(false)
    ->ignoreDotFiles(false)->in('directory');
like image 183
devsheeep Avatar answered Nov 08 '22 20:11

devsheeep