[fpc-pascal] multi-platform and filesystem case sensitivity

2014-12-20 Thread waldo kitty


what is the recommended way of handling filesystem case sensitivity when users 
can provide a filename mask for use in processing?


i'm not sure what the best or recommended way is and i'm not sure how i would 
want to handle it... i do know that i need to handle it, though... one of my 
testing systems has a case sensitive filesystem and of the 50 or so test files 
with mixed case names, only 1/3 to 1/2 are being processed...


eg: t1.txt t2.TXT T3.TXT t4.TxT



--
 NOTE: No off-list assistance is given without prior approval.
   Please *keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] multi-platform and filesystem case sensitivity

2014-12-20 Thread Bart
On 12/20/14, waldo kitty wkitt...@windstream.net wrote:

 what is the recommended way of handling filesystem case sensitivity when
 users
 can provide a filename mask for use in processing?
...
 testing systems has a case sensitive filesystem and of the 50 or so test
 files
 with mixed case names, only 1/3 to 1/2 are being processed...

 eg: t1.txt t2.TXT T3.TXT t4.TxT


So, yo need case-insensitve handling of the filemask (on a case-senistive FS)?
In that case I would use '*' as the mask and then use
MatchesMask/MatchesMaskList where you can set CaseSensitive to False.
The drawback is that this is in LazUtils and not part of FPC, but
AFAIK it can be used in programs that do not depend on LCL (so in
commandline programs).
Another possible drawback is that MatchesMasks treats everything as
being UTF8 encoded.
If that is unwanted, you can get an older version from svn.

Bart
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal