[fpc-pascal]Units for reading of config files?
Ralf A. Quint
ralf at aztechvision.net
Tue Aug 14 22:39:06 CEST 2001
At 09:32 PM 08/14/2001 +0200, you wrote:
>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;
> SR: SearchRec;
> 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?
The problem is that (anyfile-directory) include the attribute for "volume
label". It's a "feature" of DOS that in this case the call also returns
More information about the fpc-pascal