help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

GetAppConfigFile

Return an appropriate name for an application configuration file.

Declaration

Source position: line 0

function GetAppConfigFile(

  Global: Boolean

):String;

function GetAppConfigFile(

  Global: Boolean;

  SubDir: Boolean

):String;

Description

GetAppConfigFile returns the name of a file in which the application can store its configuration parameters. The Global parameter determines whether it is a global configuration file (value True) or a personal configuration file (value False). The parameter SubDir, in case it is set to True, will insert the name of a directory before the filename. This can be used in case the application needs to store other data than configuration data in an application-specific directory. Default behaviour is to set this to False.

No assumptions should be made about the existence or writeability of this file, or the directory where the file should reside.

On systems where the operating system provides a call to determine the location of configuration files, 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.

Errors

None.

See also

GetAppConfigDir

  

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

OnGetApplicationName

  

Callback to get a customized application name.

ApplicationName

  

Return a default application name

CreateDir

  

Create a new directory

ConfigExtension

  

Default application configuration file extension.

SysConfigDir

  

System configuration directory.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505