[fpc-pascal] Case insensitive FindFirst and friends

Brad Campbell brad at wasp.net.au
Mon May 18 08:18:26 CEST 2009


G'day all,

I've got a little application I'm working on that is compiled for Darwin, Linux and Win32 and I've 
bumped up against case sensitivity in FindFirst and friends.

In this application I'm populating a stringlist with a list of files in a directory with a specific 
extension, but of course I've just realised that the case of that extension is tripping me up. Is 
there a better way to achieve what I want in a cross platform manner while retaining the case 
insensitivity?

findfirst('/home/brad/*.abc',$7F,sRec) Won't list any files with a capital in the extension anywhere 
(as I guess you'd expect with a case sensitive filesystem). Unfortunately this application is being 
used to help users migrate away from the popular OS with the case insensitive filesystem and they 
are finding it difficult to cope with this behaviour.

I could write my own case insensitive search I guess (I had to do that elsewhere for another reason) 
but I thought I'd ask if there was a more standard way to solve the problem?


Regards,
Brad
-- 
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.



More information about the fpc-pascal mailing list