The 'equals' method in File can be used:
File f = new File(System.getProperty("java.home"));
File fLower = new File(f.getCanonicalPath().toLowerCase());
File fUpper = new File(f.getCanonicalPath().toUpperCase());
System.out.println("isCaseSensitive: " + !(fUpper.equals(fLower)));
Running on windows this gives false, should give true on Unix machines.
Regards,
Martin.
> Is there a decent way to check whether an application's local file-system
> is case sensitive?
Steve W. Jackson - 28 Jul 2006 16:22 GMT
> The 'equals' method in File can be used:
>
[quoted text clipped - 10 lines]
> > Is there a decent way to check whether an application's local file-system
> > is case sensitive?
Doesn't work on Mac OS X. The HFS+ filesystem is case preserving but
not case-sensitive. The above reports reports that it is case sensitive.

Signature
Steve W. Jackson
Montgomery, Alabama