procedure FindFiles(APath, AFile: string; Strings1: Tstrings);
var
  FindResult: integer;
  FSearchRec, DSearchRec: TSearchRec;
  function IsDirNotation(ADirName: string): Boolean;
  begin
    Result := ((ADirName = '.') or (ADirName = '..') or (ADirName = 'RCM_EMAIL_FILE') or (ADirName = 'ODL_Encrypt'));
  end;
begin
 if APath[Length(APath)] <> '' then  APath := APath + '';
 // 在根目录中查找指定文件
 FindResult := FindFirst(APath+'\' + AFile, faAnyFile + faHidden +faSysFile + faReadOnly, FSearchRec);
 try
   while FindResult = 0 do
   begin
       Strings1.Add(APath+'\' + FSearchRec.Name);
       FindResult := FindNext(FSearchRec); // 查找下一个指定文件
  end;
    //进入当前目录的子目录继续查找
  FindResult := FindFirst(APath+'\' + '*.*', faDirectory, DSearchRec);
   while FindResult = 0 do
   begin
    if ((DSearchRec.Attr and faDirectory) = faDirectory)
         and not IsDirNotation(DSearchRec.Name) then
      begin
         FindFiles(APath+'\' + DSearchRec.Name, AFile,Strings1);   //递归调用FindFiles函数
   end;
    FindResult := FindNext(DSearchRec);
   end;
 finally
   FindClose(FSearchRec);
 end;
这段代码是写的在指定目录下遍历所有文件的吧,我不是做DELPHI的,有些不太明白。中间这段
 begin
    Result := ((ADirName = '.') or (ADirName = '..') or (ADirName = 'RCM_EMAIL_FILE') or (ADirName = 'ODL_Encrypt'));
  end;有什么作用? 是不是排除'RCM_EMAIL_FILE'与'ODL_Encrypt'这两个目录(RCM_EMAIL_FILE,'ODL_Encrypt'是是两个文件夹名),不查找这两个文件夹里的文件?