GLib.Environment – glib-2.0 Reference Manual
Environment
Description:
public
namespace
Environment
Namespace:
GLib.Environment
Package:
glib-2.0
Content:
Methods:
public
void
atexit
(
VoidFunc
func)
Specifies a function to be called at normal program termination.
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
unowned
string
?
get_application_name
()
Gets a human-readable name for the application, as set by
set_application_name
.
public
string
get_current_dir
()
Gets the current directory.
public
unowned
string
get_home_dir
()
Gets the current user's home directory.
public
unowned
string
get_host_name
()
Return a name for the machine.
public
string
?
get_os_info
(
string
key_name)
Get information about the operating system.
public
unowned
string
get_prgname
()
Gets the name of the program.
public
unowned
string
get_real_name
()
Gets the real name of the user.
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_system_data_dirs
()
Returns an ordered list of base directories in which to access system-wide application data.
public
unowned
string
get_tmp_dir
()
Gets the directory to use for temporary files.
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_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_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_name
()
Gets the user name of the current user.
public
unowned
string
get_user_runtime_dir
()
Returns a directory that is unique to the current user on the local system.
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_user_state_dir
()
Returns a base directory in which to store state files specific to particular user.
public
unowned
string
?
get_variable
(
string
variable)
Returns the value of an environment variable.
public
string
[]
list_variables
()
Gets the names of all variables set in the environment.
public
void
set_application_name
(
string
application_name)
Sets a human-readable name for the application.
public
int
set_current_dir
(
string
path)
A wrapper for the POSIX
chdir
function.
public
void
set_prgname
(
string
application_name)
Sets the name of the program.
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.
2022 vala-language.org