Ignore:
Timestamp:
May 19, 2022, 10:39:34 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Use first capital letter in identifiers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UFindFile.pas

    r424 r447  
    66Tired of using FindFirst, Next and Close?
    77Come see how to encapsulate all those functions
    8 in a single "find-files-recursively" component.
     8in A Single "find-files-recursively" component.
    99It's easy to use, free and with code.
    1010
     
    3434  TFindFile = class(TComponent)
    3535  private
    36     s : TStringList;
    37     fSubFolder : boolean;
     36    S : TStringList;
     37    fSubFolder : Boolean;
    3838    fAttr: TFileAttrib;
    3939    fPath : string;
     
    4747  published
    4848    property FileAttr: TFileAttrib read fAttr write fAttr;
    49     property InSubFolders : boolean read fSubFolder write fSubFolder;
     49    property InSubFolders : Boolean read fSubFolder write fSubFolder;
    5050    property Path : string read fPath write SetPath;
    5151    property FileMask : string read fFileMask write fFileMask ;
     
    7979  FileMask := FilterAll;
    8080  FileAttr := [ffaAnyFile];
    81   s := TStringList.Create;
     81  S := TStringList.Create;
    8282end;
    8383
    8484destructor TFindFile.Destroy;
    8585begin
    86   s.Free;
     86  S.Free;
    8787  inherited Destroy;
    8888end;
     
    101101function TFindFile.SearchForFiles: TStringList;
    102102begin
    103   s.Clear;
     103  S.Clear;
    104104  try
    105105    FileSearch(Path);
    106106  finally
    107     Result := s;
     107    Result := S;
    108108  end;
    109109end;
     
    111111procedure TFindFile.FileSearch(const InPath : string);
    112112var Rec  : TSearchRec;
    113     Attr : integer;
     113    Attr : Integer;
    114114begin
    115115  Attr := 0;
     
    125125  try
    126126    repeat
    127       s.Add(inPath + Rec.Name);
     127      S.Add(inPath + Rec.Name);
    128128    until SysUtils.FindNext(Rec) <> 0;
    129129  finally
Note: See TracChangeset for help on using the changeset viewer.