[Lazarus] FindFile in sub directories using filter '*.cfg'

bb bartjunk64 at gmail.com
Tue Mar 25 18:45:07 CET 2008

On 3/24/08, el stamatakos <el_stamatakos at hotmail.com> wrote:
>  Hi,
>  I have a function that has worked quite well in Windows. Now I try to use
> it on Linux and it does not appear to be going into subdirectories where the
> files are actually stored. The unit is below. I use the following
> FindFile1.Filemask:='*.cfg';
> FindFile1.InSubFolders:=True;
> FindFile.Path:='/test/sup/Data';

As others allready pointed out there are two problems. Firts the mask (*.*
vs *) secondly the case-sensitivity.
I wrote some class like you did that solves these problems.
It will let you specify if the mask is linux or windows style, and it uses
an extended version of TMask to do filename matching. This will let you
specify wether the mask is case sensitive. (as anadded bonus my class also
excepts an exclusion mask, to exlude files from the serach, and it will let
you use sets (like [a..d,y,z] in filemask).
I tested it on Linux and Win32.
I could mail it (or put it somewhere on the web for you) if you're

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20080325/74f68811/attachment-0007.html>

More information about the Lazarus mailing list