Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2000-11

FindFirst

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Hinrich Donner

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
Marco van de Voort
to Hinrich Donner
FindFirst,FindNext (of SysUtils) does not work:

Standard question: Which compiler/rtl? 1.1 or 1.0.3 branch? :-)

This because I also noted some problems in the 1.1 IDE on FreeBSD, which at first I sought in the beta status of the FreeBSD rtl. But later it disappeared.

If it is in 1.1, please retest with a more recent snapshot. My problem disappeared in a CVS snapshot from Friday about 18:00

md
to Hinrich Donner: FindFirst,FindNext (of SysUtils) does not work: uses sysutils; procedure testff(const s:…

I experienced the same thing and used opendir( ) and readdir( ) type functions.

Mark

Hinrich Donner wrote 36 lines
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 _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Hinrich Donner
to Marco van de Voort: Standard question: Which compiler/rtl? 1.1 or 1.0.3 branch? :-) This because I also noted…

Hi,

Marco van de Voort wrote
Standard question: Which compiler/rtl? 1.1 or 1.0.3 branch? :-)

I'm using that FIXES_1_0_0 because I had some problems with the 1.1. I have updated it today out of the CVS.

This because I also noted some problems in the 1.1 IDE on FreeBSD, which at first I sought in the beta status of the FreeBSD rtl. But later it disappeared.

I never tried the IDE because it's not on the web site and I can't compile it (unit DRIVERS missing).

Hinrich

Hinrich Donner