[fpc-pascal]Units for reading of config files?
Aitor Santamaria Merino
aitor.sm at terra.es
Tue Aug 14 21:32:53 CEST 2001
Marco van de Voort escribió:
>
> > >Are there any ready-to-use units for the parsing of config-files? (for
> > >the linux-version)
> >
> > In the FCL is a unit inifiles
>
> My conffiles unit is on the contributed pages site. That one can also do
> "nested" ini, and other stuff (like Golded'ish configuration files)
Ok, ok, I might be saying something stupid, but I have just looked at
your source and found this. Looks like a small bug, but...
function IsFile(const S: String): Boolean;
var
SR: SearchRec;
begin
FindFirst(S, Anyfile-directory, SR);
^^^^^ Ok, so you look for any file with no-directory attribute
if DosError = 0 then
IsFile := SR.Attr and Directory <> 0
^^^^^ This returns TRUE whenever it is a directory?
else IsFile := False;
end;
Aitor
More information about the fpc-pascal
mailing list