Hi guys

Tinkering with Findfirst, Findnext functions within Linux, I discovered that 
the file attribute pointing to the parent dir and the curent dir (. + ..) are 
missing from filutilh.inc - Am I looking in the wrong place?

I found that the following works;

procedure Test();
const
   faDirDots = $00000030; //* missing in filutilh.inc   

   //* other declerations ommitted 

begin
   if FindFirst('*', faAnyFile, SearchRec) = 0 then
   begin
       repeat
        //* list all files except . and ..
        if SearchRec.Attr <> faDirDots then
            Writeln(SearchRec.Name);
        until FindNext(SearchRec) <> 0;

        FindClose(SearchRec);
    end;       
end;

Regards
Nino       

     

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to