GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
GIS library - Mapset name, search path routines. More...
#include <grass/config.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <dirent.h>
#include <unistd.h>
#include <grass/gis.h>
#include "gis_local_proto.h"
Go to the source code of this file.
Functions | |
const char * | G_get_mapset_name (int n) |
Get name of the n'th mapset from the current mapset search path. More... | |
void | G__get_list_of_mapsets (void) |
Fill list of mapsets from search path (internal use only) More... | |
void | G_create_alt_search_path (void) |
Define alternative mapset search path. More... | |
void | G_switch_search_path (void) |
Switch mapset search path. More... | |
void | G_reset_mapsets (void) |
Reset number of mapsets. More... | |
char ** | G_get_available_mapsets (void) |
Get list of available mapsets for current location. More... | |
void | G_add_mapset_to_search_path (const char *mapset) |
Add mapset to the list of mapsets in search path. More... | |
int | G_is_mapset_in_search_path (const char *mapset) |
Check if given mapset is in search path. More... | |
GIS library - Mapset name, search path routines.
(C) 1999-2014 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 mapset_nme.c.
void G__get_list_of_mapsets | ( | void | ) |
Fill list of mapsets from search path (internal use only)
Definition at line 57 of file mapset_nme.c.
Referenced by G_get_mapset_name(), and G_init_all().
void G_add_mapset_to_search_path | ( | const char * | mapset | ) |
Add mapset to the list of mapsets in search path.
Mapset is add in memory only, not to the SEARCH_PATH file! List is check first if already exists.
mapset | mapset name to be added to the search path |
Definition at line 200 of file mapset_nme.c.
References G_is_mapset_in_search_path().
void G_create_alt_search_path | ( | void | ) |
Define alternative mapset search path.
Definition at line 103 of file mapset_nme.c.
char** G_get_available_mapsets | ( | void | ) |
Get list of available mapsets for current location.
List is updated by each call to this function.
Definition at line 144 of file mapset_nme.c.
References G_calloc, G_debug(), G_free(), G_location_path(), G_realloc, G_stat(), G_store(), GPATH_MAX, NULL, opendir(), and readdir().
const char* G_get_mapset_name | ( | int | n | ) |
Get name of the n'th mapset from the current mapset search path.
The first call will initialize the list.
n | mapset index |
Definition at line 44 of file mapset_nme.c.
References G__get_list_of_mapsets(), and NULL.
int G_is_mapset_in_search_path | ( | const char * | mapset | ) |
Check if given mapset is in search path.
mapset | mapset name |
Definition at line 214 of file mapset_nme.c.
Referenced by G_add_mapset_to_search_path().
void G_reset_mapsets | ( | void | ) |
Reset number of mapsets.
Definition at line 132 of file mapset_nme.c.
void G_switch_search_path | ( | void | ) |