On 2/9/13, Michael Van Canneyt <mich...@freepascal.org> wrote:

> Like I said, we can imagine a parameter 'AllowCreate' or 'ForceCreate'.

GetAppConfigDir(Global : Boolean: ForceCreate: Booelan = false) : String;

While this can easily be implemented without breaking existing code,
this still does not solve the original problem.
If creating the directory fails, the function does not return an
errorcode, unless we decide to let it raise an exception in this
case..

Common programming sense would be to query the desired location, and
if it does not exists, try and create it,(for this the ForeceCreate
parameter is usefull) __and check__ if this went OK.

So, no matter how we change the GetAppConfigDir() function, it will
always require code for checking if all went OK.

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

Reply via email to