1

Topic: Search of files in several masks

Greetings
Found the code which can implement my idea

uses
StrUtils, Types, Masks, IOUtils;
function MyGetFiles (const Path, Masks: string): TStringDynArray;
var
MaskArray: TStringDynArray;
Predicate: TDirectory. TFilterPredicate;
begin
MaskArray: = SplitString (Masks, '; ');
Predicate: =
function (const Path: string; const SearchRec: TSearchRec): Boolean
var
Mask: string;
begin
for Mask in MaskArray do
if MatchesMask (SearchRec. Name, Mask) then
exit (True);
exit (False);
end;
Result: = TDirectory. GetFiles (Path, Predicate);
end;

But I can not understand where to hammer in masks for search
Help

2

Re: Search of files in several masks

racosa123;
Obviously in Masks to enumerate through ";".

3

Re: Search of files in several masks

527470 wrote:

racosa123;
Obviously in Masks to enumerate through ";".

Can help with the code please?

4

Re: Search of files in several masks

racosa123 wrote:

but I can not understand where to hammer in masks for search

Probably, it is necessary to hammer in masks into parameter with "the Mask" title? Yes not, delirium, it would be
Too simply.

5

Re: Search of files in several masks

527470;

MaskArray: = SplitString (Masks,>>> '; ' <<<);