Miscellaneous Utilities
Miscellaneous Utilities
These are portable utility functions.
Application Name and Environment
g_get_application_name()g_set_application_name()g_get_prgname()g_set_prgname()g_get_environ()g_environ_getenv()g_environ_setenv()g_environ_unsetenv()g_getenv()g_setenv()g_unsetenv()g_listenv()g_get_user_name()g_get_real_name()
System Directories
g_get_user_cache_dir()g_get_user_data_dir()g_get_user_config_dir()g_get_user_state_dir()g_get_user_runtime_dir()g_get_user_special_dir()g_get_system_data_dirs()g_get_system_config_dirs()g_reload_user_special_dirs_cache()
OS Info
Information about the current OS can be retrieved by calling
g_get_os_info() and passing it one of the following keys (this list may
grow in future):
G_OS_INFO_KEY_NAMEG_OS_INFO_KEY_PRETTY_NAMEG_OS_INFO_KEY_VERSIONG_OS_INFO_KEY_VERSION_CODENAMEG_OS_INFO_KEY_VERSION_IDG_OS_INFO_KEY_IDG_OS_INFO_KEY_HOME_URLG_OS_INFO_KEY_DOCUMENTATION_URLG_OS_INFO_KEY_SUPPORT_URLG_OS_INFO_KEY_BUG_REPORT_URLG_OS_INFO_KEY_PRIVACY_POLICY_URL
Paths
g_get_host_name()g_get_home_dir()g_get_tmp_dir()g_get_current_dir()g_canonicalize_filename()g_path_is_absolute()g_path_skip_root()g_path_get_basename()g_path_get_dirname()g_build_filename()g_build_filenamev()g_build_filename_valist()g_build_path()g_build_pathv()