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

Bart bartjunk64 at gmail.com
Sat Dec 20 14:34:45 CET 2014

On 12/20/14, waldo kitty <wkitty42 at 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.


More information about the fpc-pascal mailing list