Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

GetAppConfigDir

Return the appropriate directory for the application's configuration files.

Declaration

Source position: osutilsh.inc line 45

function GetAppConfigDir(

  Global: Boolean

):string;

Description

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

GetAppConfigFile

  

Return an appropriate name for an application configuration file.

ApplicationName

  

Return a default application name.

OnGetApplicationName

  

Callback to get a customized application name.

CreateDir

  

Create a new directory.

SysConfigDir

  

System configuration directory.

VendorName

  

Return Application vendor Name.


Documentation generated on: Dec 24 2024