[fpc-pascal]FindFirst

Hinrich Donner hd at tiro.de
Mon Nov 20 11:02:09 CET 2000


Hi,

FindFirst,FindNext (of SysUtils) does not work:


uses
  sysutils;

procedure testff(const s: string);
var
  sr: tsearchrec;
begin
  if findfirst(s,faAnyFile,sr)=0 then repeat
    writeln(sr.name);
  until findnext(sr)<>0;
  findclose(sr);
end;

begin
  testff('/home/hd/.openxp/autoexec/*');
end.

The directory contains a lot of files eg. 11466e4d.pkt, 446D1F3F.PKT, but
only '.' and '..' will be returned. The same is by using '*.*' insted of
'*'.

Any hints?

Hinrich

-- 
Hinrich Donner





More information about the fpc-pascal mailing list