Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Enhancement: Add support for filtering files in Globbing alias #1384
This would be a trivial addition to make at the method alias level. I would propose that two overloads be created --
GetFiles(this ICakeContext context, string pattern, Func<IFile, bool> filePredicate) ... GetFiles(this ICakeContext context, string pattern, Func<IDirectory, bool> predicate, Func<IFile, bool> filePredicate) ...
The former would satisfy the direct need of the feature request, the latter would provide a graceful pairing of current + extended logic.
Assuming that this is something that seems useful and aligned with the intent of the project, the question I would raise is whether it's more appropriate to implement the logic directly in the alias method, similar to ..
or whether it would be more appropriately implemented in the globbing internals --
Constraining it to the alias would certainly be less involved, but the latter seems like it would probably be a cleaner (and faster) implementation, particularly in eliminating the extra calls to
Thoughts on whether or not this would be worth pursuing? Any other feedback?