GLib.Environment – glib-2.0 Reference Manual
Packages
glib-2.0
GLib
Environment
atexit
find_program_in_path
get_application_name
get_current_dir
get_home_dir
get_host_name
get_prgname
get_real_name
get_system_config_dirs
get_system_data_dirs
get_tmp_dir
get_user_cache_dir
get_user_config_dir
get_user_data_dir
get_user_name
get_user_special_dir
get_variable
list_variables
set_application_name
set_current_dir
set_prgname
set_variable
unset_variable
GLib.Environment
Description:
Content:
Functions:
public
unowned
string
?
get_application_name
()
Gets a human-readable name for the application, as set by
set_application_name
.
public
void
set_application_name
(
string
application_name)
Sets a human-readable name for the application.
public
unowned
string
get_prgname
()
Gets the name of the program.
public
void
set_prgname
(
string
application_name)
Sets the name of the program.
public
unowned
string
?
get_variable
(
string
variable)
Returns the value of an environment variable.
public
bool
set_variable
(
string
variable,
string
value,
bool
overwrite)
Sets an environment variable.
public
void
unset_variable
(
string
variable)
Removes an environment variable from the environment.
public
string
[]
list_variables
()
Gets the names of all variables set in the environment.
public
unowned
string
get_user_name
()
Gets the user name of the current user.
public
unowned
string
get_real_name
()
Gets the real name of the user.
public
unowned
string
get_user_cache_dir
()
Returns a base directory in which to store non-essential, cached data specific to particular user.
public
unowned
string
get_user_data_dir
()
Returns a base directory in which to access application data such as icons that is customized for a particular user.
public
unowned
string
get_user_config_dir
()
Returns a base directory in which to store user-specific application configuration information such as user preferences and settings.
public
unowned
string
get_user_special_dir
(
UserDirectory
directory)
Returns the full path of a special directory using its logical id.
public
unowned
string
[]
get_system_data_dirs
()
Returns an ordered list of base directories in which to access system-wide application data.
public
unowned
string
[]
get_system_config_dirs
()
Returns an ordered list of base directories in which to access system-wide configuration information.
public
unowned
string
get_host_name
()
Return a name for the machine.
public
unowned
string
get_home_dir
()
Gets the current user's home directory.
public
unowned
string
get_tmp_dir
()
Gets the directory to use for temporary files.
public
string
get_current_dir
()
Gets the current directory.
public
string
?
find_program_in_path
(
string
program)
Locates the first executable named
program
in the user's path, in the same way that
execvp
would locate it.
public
void
atexit
(
VoidFunc
func)
Specifies a function to be called at normal program termination.
public
int
set_current_dir
(
string
path)
A wrapper for the POSIX
chdir
function.