7

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

Matteo
  • 37,680
  • 11
  • 100
  • 115
Jarda
  • 566
  • 1
  • 9
  • 33

1 Answers1

18

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');
Tac Tacelosky
  • 3,165
  • 3
  • 27
  • 28
devsheeep
  • 2,076
  • 1
  • 22
  • 31
  • Additionally. Even if `ignoreDotFiles` is set to `false` but you are using bash wildcard pattern of filename it won't work. So there you'd better use regular expression for name matching. – lazycommit Feb 08 '18 at 09:38