G
Guest
I was writing my own wildcard compare algorithm and making a custom GetFiles
routine when I came across what I think is a bug in .net's own GetFiles.
My routine was coming up with different results than GetFiles so naturally I
thought it was my routine that was bugged but when I investigated it the
results from my algorithm where exactly what I would expect.
call: System.IO.Directory.GetFiles("d:\\windows\\system32\\", "*ae?*.*",
SearchOption.AllDirectories);
a sample of the results:
d:\windows\system32\dllcache\kbdgae.dll
Correct me if I am wrong but is '?' not mean 1 and only 1 of any character?
should it not skip the above file because there is no character between the
"ae" and the '.'?
I bring this up because I use GetFiles often and want to make sure I
understand what it is doing.
routine when I came across what I think is a bug in .net's own GetFiles.
My routine was coming up with different results than GetFiles so naturally I
thought it was my routine that was bugged but when I investigated it the
results from my algorithm where exactly what I would expect.
call: System.IO.Directory.GetFiles("d:\\windows\\system32\\", "*ae?*.*",
SearchOption.AllDirectories);
a sample of the results:
d:\windows\system32\dllcache\kbdgae.dll
Correct me if I am wrong but is '?' not mean 1 and only 1 of any character?
should it not skip the above file because there is no character between the
"ae" and the '.'?
I bring this up because I use GetFiles often and want to make sure I
understand what it is doing.