list_variables
Description:
[ Version ( since = "2.8" ) ]
[ CCode ( array_length = false , array_null_terminated = true , cname = "g_listenv" ) ]
public string[] list_variables ()
[ CCode ( array_length = false , array_null_terminated = true , cname = "g_listenv" ) ]
public string[] list_variables ()
Example: Get the names of all variables set in the environment:
public static int main () {
// Local Output:
// ``SSH_AGENT_PID``
// ``PATH``
// ...
string[] args = Environment.list_variables ();
foreach (string arg in args) {
print ("%s\n", arg);
}
return 0;
}
valac --pkg glib-2.0 GLib.Environment.list_variables.vala
Namespace: GLib.Environment
Package: glib-2.0