[Lazarus] FindFile in sub directories using filter '*.cfg'
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Mar 25 08:35:38 CET 2008
On Tue, 25 Mar 2008 09:02:38 +0200
"Graeme Geldenhuys" <graemeg.lists at gmail.com> wrote:
> On 25/03/2008, 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 constructor TFindFile.Create(AOwner:
> > TComponent); begin
> > inherited Create(AOwner);
> > Path := IncludeTrailingBackslash(GetCurrentDir);
> > FileMask := '*.*';
>
>
> The filemask is you problem. Under Linux or any *unix environment,
> the filemask must be '*' only. If you use '*.*', your directory name
> must have a '.' somewhere in the name, to be found. '*' covers all
> names.
>
> I think you can even use the '*' under Windows too, without having to
> resort to IFDEF's.
>
> I really think FPC should have a AllFiles file mask in the RTL, like
> it has for Path Delimiters etc... I've created numerous projects
> where I used IFDEF's to define a cAllFiles constant for specific
> platforms.
AllFilesMask
Mattias
More information about the Lazarus
mailing list