On Wed, Jun 04, 2003 at 10:23:58AM -0500, Ken Williams wrote:
> Well, your technique of reading the entire directory just to get the 
> proper-case name of a single file is no Cat Pajama Suit either.
> 
> The only real way to handle it properly if you have no advance 
> knowledge of the filesystem is to query the OS for the proper casing.  
> Mac OS X has this ability, it's probably available in other 
> case-insensitive case-preserving environments too if we wanted to 
> bother with it.

A far simpler thing to do is just write out a mixed-case filename and
see what you get back from readdir() to test for case preservation.  For
case sensitivity, just write out a filename and try to open it with a
different casing.

I plan on creating a module to do this sort of file system probing after
I finally get a stable version of MakeMaker out the door.


-- 
<GuRuThuG> make a channel called #Perl, and infest it with joking and 
           fun.... it doesnt make alot of sense.

Reply via email to