Changeset 187 for trunk/Packages/Common/UCommon.pas
- Timestamp:
- Jul 11, 2018, 3:49:23 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UCommon.pas
r186 r187 73 73 function LoadFileToStr(const FileName: TFileName): AnsiString; 74 74 procedure SearchFiles(AList: TStrings; Dir: string; 75 FilterMethod: TFilterMethodMethod );75 FilterMethod: TFilterMethodMethod = nil); 76 76 function GetStringPart(var Text: string; Separator: string): string; 77 77 function PosFromIndex(SubStr: string; Text: string; … … 528 528 529 529 procedure SearchFiles(AList: TStrings; Dir: string; 530 FilterMethod: TFilterMethodMethod );530 FilterMethod: TFilterMethodMethod = nil); 531 531 var 532 532 SR: TSearchRec; … … 536 536 try 537 537 repeat 538 if (SR.Name = '.') or (SR.Name = '..') or not FilterMethod(SR.Name) or539 not FilterMethod(Copy(Dir, 3, Length(Dir)) + SR.Name) then Continue;538 if (SR.Name = '.') or (SR.Name = '..') or (Assigned(FilterMethod) and (not FilterMethod(SR.Name) or 539 not FilterMethod(Copy(Dir, 3, Length(Dir)) + SR.Name))) then Continue; 540 540 AList.Add(Dir + SR.Name); 541 541 if (SR.Attr and faDirectory) <> 0 then
Note:
See TracChangeset
for help on using the changeset viewer.