-
-
Notifications
You must be signed in to change notification settings - Fork 21
argument $masks in find methods made required #5
Conversation
vlastavesely
commented
Feb 12, 2017
- bug fix? yes
- BC break? no
|
I like more explicit findFiles('*') |
|
OK, but, in my opinion, it is problem that if you call it with empty |
|
And can you fix it? |
|
yes |
|
Argument $masks is now required. Do you like it more? |
|
What about to change declaration to |
|
And perhaps use only one way: the array or more parameters. The second way should be deprecated. |
I think it would be unnecessarily overcombined and little bit confusing. |
|
What about to unify API of Finder and RobotLoader in some way? RobotLoader accepts |
|
It may be just me, but I would prefer that calling |
|
I can imagine I would be a little bit confused if function named |
And someone might expect the opposite, find all files (i.e. no mask -> no filter -> find everything). |
|
I agree with @Majkl578 and also with @JanTvrdik.
Just an idea, let's discuss it. |
|
According to me, function that does not find anything by default is useless. Take Linux command Another thing: imagine you have a directory and you want to check whether it is empty. You call |
|
I also think findFiles without any mask should return all files. It makes more sense then returning nothing and is consistent with similar tools. |
|
Thanks @dg |