Util.environSetenv

Sets the environment variable variable in the provided list envp to value. Both the variable's name and value should be in the GLib file name encoding. On UNIX, this means that they can be arbitrary byte strings. On Windows, they should be in UTF-8. Since 2.32

class Util
static
string[]
environSetenv
(
string[] envp
,
string variable
,
string value
,)

Parameters

envp string[]

an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or NULL for an empty environment list. [allow-none][array zero-terminated=1][transfer full]

variable string

the environment variable to set, must not contain '='

value string

the value for to set the variable to

overwrite int

whether to change the variable if it already exists

Return Value

Type: string[]

the updated environment list. Free it using g_strfreev(). [array zero-terminated=1][transfer full]

Meta