procedure TestFindFirst(WrkDir:String);
var PathInfo: TSearchRec;
begin
SysUtils.FindFirst(AppendPathDelim(WrkDir) + GetAllFilesMask, faDirectory, PathInfo);
SysUtils.FindClose(PathInfo);
{$IFDEF MSWINDOWS}
if (PathInfo.FindHandle <> -1) then begin
{$ENDIF}
{$IFDEF Linux}
if (PathInfo.FindHandle <> nil) then begin
{$ENDIF}
ShowMessage('Error !!!');
end else begin
ShowMessage('Ok ');
end;
Halt;
end;