Changeset 447 for trunk/Packages/Common/UFindFile.pas
- Timestamp:
- May 19, 2022, 10:39:34 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UFindFile.pas
r424 r447 6 6 Tired of using FindFirst, Next and Close? 7 7 Come see how to encapsulate all those functions 8 in a single "find-files-recursively" component.8 in A Single "find-files-recursively" component. 9 9 It's easy to use, free and with code. 10 10 … … 34 34 TFindFile = class(TComponent) 35 35 private 36 s: TStringList;37 fSubFolder : boolean;36 S : TStringList; 37 fSubFolder : Boolean; 38 38 fAttr: TFileAttrib; 39 39 fPath : string; … … 47 47 published 48 48 property FileAttr: TFileAttrib read fAttr write fAttr; 49 property InSubFolders : boolean read fSubFolder write fSubFolder;49 property InSubFolders : Boolean read fSubFolder write fSubFolder; 50 50 property Path : string read fPath write SetPath; 51 51 property FileMask : string read fFileMask write fFileMask ; … … 79 79 FileMask := FilterAll; 80 80 FileAttr := [ffaAnyFile]; 81 s:= TStringList.Create;81 S := TStringList.Create; 82 82 end; 83 83 84 84 destructor TFindFile.Destroy; 85 85 begin 86 s.Free;86 S.Free; 87 87 inherited Destroy; 88 88 end; … … 101 101 function TFindFile.SearchForFiles: TStringList; 102 102 begin 103 s.Clear;103 S.Clear; 104 104 try 105 105 FileSearch(Path); 106 106 finally 107 Result := s;107 Result := S; 108 108 end; 109 109 end; … … 111 111 procedure TFindFile.FileSearch(const InPath : string); 112 112 var Rec : TSearchRec; 113 Attr : integer;113 Attr : Integer; 114 114 begin 115 115 Attr := 0; … … 125 125 try 126 126 repeat 127 s.Add(inPath + Rec.Name);127 S.Add(inPath + Rec.Name); 128 128 until SysUtils.FindNext(Rec) <> 0; 129 129 finally
Note:
See TracChangeset
for help on using the changeset viewer.