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



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

GetAppConfigDir

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

Declaration

Source position: osutilsh.inc line 37

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.

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.

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.

Notes

 No notes exist for this page yet. 





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