Symfony Finder会忽略以点开头的文件 [英] Symfony Finder ignores files beginning by dot

查看:106
本文介绍了Symfony Finder会忽略以点开头的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Finder发送假脱机电子邮件,但是自动名称生成器会在文件名中添加点,有时它们会出现在文件的开头.

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

推荐答案

只需设置 ignoreDotFiles 设置为false.

Just set ignoreDotFiles to false.

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

这篇关于Symfony Finder会忽略以点开头的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆