This patch adds wildcard support to file::exists(). Basically it uses
DirectoryScanner to find matching files.
Is it ok to commit it ?
Jarek
fileexists.patch
Description: Binary data
Subject: Re: PATCH: file::exists() wildcard support, WAS: Re: [nant-dev] 2
small changes to consider
Is there any reason that you don't always use the scanner?
if (file.IndexOf(*) != -1 || file.IndexOf(?) != -1) {
...
} else
return File.Exists(Project.GetFullPath(file));
Less code paths
Yeah, I'm sure we all go back and forward on this issue. Performance is
important, and we should strive towards it, but I have found that
sometimes
what seems like a performance tweak turns out to not work out as I expect.
I'm sure the scanner is slower than file.exists, but in this case I