GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
GIS library - Determine GRASS data base file name. More...
Go to the source code of this file.
Functions | |
char * | G_file_name (char *path, const char *element, const char *name, const char *mapset) |
Builds full path names to GIS data files. More... | |
char * | G_file_name_misc (char *path, const char *dir, const char *element, const char *name, const char *mapset) |
Builds full path names to GIS misc data files. More... | |
char * | G_file_name_tmp (char *path, const char *element, const char *name, const char *mapset) |
Builds full path names to GIS data files in temporary directory (for internal use only) More... | |
char * | G_file_name_basedir (char *path, const char *element, const char *name, const char *mapset, const char *basedir) |
Builds full path names to GIS data files in temporary directory (for internal use only) More... | |
GIS library - Determine GRASS data base file name.
(C) 2001-2015 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 file_name.c.
char* G_file_name | ( | char * | path, |
const char * | element, | ||
const char * | name, | ||
const char * | mapset | ||
) |
Builds full path names to GIS data files.
If name is of the form "nnn@ppp" then path is set as if name had been "nnn" and mapset had been "ppp" (mapset parameter itself is ignored in this case).
Paths to files are currently in form: /path/to/location/mapset/element/name
path input buffer memory must be allocated by caller.
C:
Python:
[out] | path | allocated buffer to hold resultant full path to file |
element | database element (eg, "cell", "cellhd", "vector", etc) | |
name | name of file to build path to (fully qualified names allowed) | |
mapset | mapset name |
Definition at line 61 of file file_name.c.
Referenced by G_get_projepsg(), G_get_projinfo(), G_get_projunits(), G_has_vector_timestamp(), G_make_mapset_element(), G_mapset_permissions(), G_myname(), G_rename(), G_write_projsrid(), G_write_projwkt(), list_subgroups(), M__empty(), M_do_copy(), main(), Rast_map_is_fp(), Rast_map_type(), V1_close_nat(), Vect__get_element_path(), and Vect_copy().
char* G_file_name_basedir | ( | char * | path, |
const char * | element, | ||
const char * | name, | ||
const char * | mapset, | ||
const char * | basedir | ||
) |
Builds full path names to GIS data files in temporary directory (for internal use only)
By default the GRASS temporary directory is located at $LOCATION/$MAPSET/.tmp/$HOSTNAME/. If basedir is provided, the temporary directory is located at <basedir>/.tmp/$HOSTNAME/.
[out] | path | buffer to hold resultant full path to file |
element | database element (eg, "cell", "cellhd", "vector", etc) | |
name | name of file to build path to (fully qualified names allowed) | |
mapset | mapset name |
Definition at line 154 of file file_name.c.
char* G_file_name_misc | ( | char * | path, |
const char * | dir, | ||
const char * | element, | ||
const char * | name, | ||
const char * | mapset | ||
) |
Builds full path names to GIS misc data files.
Paths to misc files are currently in form: /path/to/location/mapset/dir/name/element
path input buffer memory must be allocated by caller.
C:
Python:
[out] | path | allocated buffer to hold resultant full path to file |
dir | misc directory (e.g., "cell_misc", "group") | |
element | database element (in this case – file to build path to e.g., "history", "REF") | |
name | name of object (raster, group; fully qualified names allowed e.g., "my_raster@PERMANENT") | |
mapset | mapset name |
Definition at line 101 of file file_name.c.
Referenced by Rast3d_filename(), Rast__check_fp_type(), and Rast__close_null().
char* G_file_name_tmp | ( | char * | path, |
const char * | element, | ||
const char * | name, | ||
const char * | mapset | ||
) |
Builds full path names to GIS data files in temporary directory (for internal use only)
By default temporary directory is located $LOCATION/$MAPSET/.tmp/$HOSTNAME. If GRASS_VECTOR_TMPDIR_MAPSET is set to "0", the temporary directory is located in TMPDIR (environmental variable defined by the user or GRASS initialization script if not given). Note that GRASS_VECTOR_TMPDIR_MAPSET variable is currently used only by vector library.
[out] | path | buffer to hold resultant full path to file |
element | database element (eg, "cell", "cellhd", "vector", etc) | |
name | name of file to build path to (fully qualified names allowed) | |
mapset | mapset name |
Definition at line 125 of file file_name.c.
References NULL.
Referenced by G_make_mapset_element_tmp(), and Vect__get_element_path().