GetAppConfigDir function
Return the appropriate directory for the application's configuration files.
Declaration
function GetAppConfigDir(Global: Boolean): stringDescription
GetAppConfigDir returns the name of a directory in which the
application should store its configuration files on the current OS.
If the parameter
Global is
True then the directory
returned is a global
directory, i.e. valid for all users on the system. If the parameter
Global is false, then the directory is specific for the user who
is executing the program. On systems that do not support multi-user
environments, these two directories may be the same.
The directory which is returned is the name of the directory where the application is
supposed to store files. This does not mean that the directory exists, or
that the user can write in this directory (especially if
Global=True). It just returns the name of the
appropriate location. Also note that the returned name always contains an ending
path delimiter.
On systems where the operating system provides a call to determine this location, this call will be used. On systems where there is no such call, an algorithm is used which reflects common practice on that system.
The application name is deduced from the binary name via the ApplicationName call, but can be configured by means of the OnGetApplicationName callback.
If VendorName is not-empty, then VendorName will also be
inserted before the application-specific directory.
Errors
None.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
