Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

File-system case sensitivity

Thread view: 
Jeffrey Schwab - 28 Jul 2006 00:07 GMT
Is there a decent way to check whether an application's local
file-system is case sensitive?
Martin Lansler - 28 Jul 2006 00:30 GMT
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



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.