>>I've tried the following simple piece of test code, but it only seems to
>>match a single file that matches the filter, not all the files that match
>>the filter. Could someone point out where I'm going wrong (Jakarta-ORO
2.0.4
>>on Win2K, JDK 1.3.1_01 FWIW).
>
>Maybe the glob expression you're using really matches only that file.
>This is what I get when I run your program:
>
>~/develop/jakarta-oro/classes> java Test "*.class"
Doh! The problem was that either Win2K or java.exe (I'm not sure which)
was the globbing command line for me. I didn't expect that on a non-UNIX box
so was globbing for *.class not "*.class" - args[0] had "test.class",
args[1]
had "test2.class", etc. As I was globbing for args[0] I only ever found the
one file (that sound you can hear is my head gently hitting the desk). Thank
you for pointing out my obvious mistake.
However, now it's working I have another interesting question. I would
expect
filename filters to be case sensitive on UNIX and case insensitive on Win32.
Yet, Win32 does case sensitive globbing ("*.Class" will find no files). So,
Q. Should the *FilenameFilter classes do a case-insensitive filter by
default
on case-insensitive file systems?
Supplementary Q: How can you tell that a file system is case-insensitive?
Greg
--
This post represents the views of the author and does
not necessarily accurately represent the views of BT.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>