On 3/24/08, el stamatakos <[EMAIL PROTECTED]> 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
interested.

Bart
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to