Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-12

multi-platform and filesystem case sensitivity

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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.

Reply by email

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

...

Show quoted text 6 lines
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

Reply by email