Symfony Finder ignores files beginning by dot

1.6k Views Asked by At

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

1

There are 1 best solutions below

1
On BEST ANSWER

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');