GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
GIS Library - Get user's home or config directory. More...
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include "gis_local_proto.h"
Go to the source code of this file.
Functions | |
const char * | G_home (void) |
Get user's home directory. More... | |
const char * | G__home (void) |
Get user's home directory (internal use only) More... | |
const char * | G_config_path (void) |
Get user's config path directory. More... | |
GIS Library - Get user's home or config directory.
(C) 2001-2014 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file home.c.
const char* G__home | ( | void | ) |
Get user's home directory (internal use only)
Returns a pointer to a string which is the full path name of the user's home directory.
Definition at line 53 of file home.c.
Referenced by G_home(), and G_init_all().
const char* G_config_path | ( | void | ) |
Get user's config path directory.
Returns a pointer to a string which is the full path name of the user's GRASS config directory in their home directory.
The path is not guaranteed to exist.
Definition at line 98 of file home.c.
References _, CONFIG_DIR, G_fatal_error(), G_home(), G_initialize_done(), G_is_initialized(), G_mkdir(), G_store(), getenv(), GPATH_MAX, and HOST_DIRSEP.
const char* G_home | ( | void | ) |
Get user's home directory.
Returns a pointer to a string which is the full path name of the user's home directory.
Calls G_fatal_error() on failure.
Definition at line 32 of file home.c.
References _, G__home(), G_fatal_error(), and NULL.
Referenced by G_config_path().