[fpc-devel] GetAppConfigFile
Michael Van Canneyt
michael at freepascal.org
Sat Oct 4 15:32:46 CEST 2008
On Sat, 4 Oct 2008, Micha Nelissen wrote:
> Hi,
>
> Why is there a parameter to GetAppConfigFile? I'd suggest something like:
>
> function GetAppConfigFile: string;
> begin
> { first look for user specific config file }
> Result := GetAppConfigFile(false);
> if FileExists(Result) then
> exit;
> { otherwise use global one }
> Result := GetAppConfigFile(true);
> end;
>
> This would first look for the user version, then for the global variant.
>
> (BTW: instead of Boolean, I would have liked a acLocal, acGlobal better, it's
> clearer to read).
>
> Any thoughts?
As far as I'm concerned, you can add this as an overloaded version,
but don't change the boolean. The API is in use too long for that,
and such a change would only reflect your personal preference.
Michael.
More information about the fpc-devel
mailing list