GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-d6dec75dd4
|
GIS library - Find GRASS data base files. More...
Go to the source code of this file.
Functions | |
const char * | G_find_file (const char *element, char *name, const char *mapset) |
Searches for a file from the mapset search list or in a specified mapset. More... | |
const char * | G_find_file_misc (const char *dir, const char *element, char *name, const char *mapset) |
Searches for a misc file from the mapset search list or in a specified mapset. More... | |
const char * | G_find_file2 (const char *element, const char *name, const char *mapset) |
Searches for a file from the mapset search list or in a specified mapset. (look but don't touch) More... | |
const char * | G_find_file2_misc (const char *dir, const char *element, const char *name, const char *mapset) |
Searches for a misc file from the mapset search list or in a specified mapset. (look but don't touch) More... | |
GIS library - Find GRASS data base files.
(C) 2001-2009 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 find_file.c.
const char* G_find_file | ( | const char * | element, |
char * | name, | ||
const char * | mapset | ||
) |
Searches for a file from the mapset search list or in a specified mapset.
Returns the mapset name where the file was found.
If the user specifies a fully qualified element (name@mapset) which exists, then G_find_file() modifies "name" by removing the "@mapset" part.
Rejects all names that begin with "."
If name is of the form nnn in ppp then only mapset ppp is searched.
element | database element (eg, "cell", "cellhd", "colr", etc) |
name | file name to look for |
mapset | mapset to search. if mapset is "" will search in mapset search list |
Definition at line 186 of file find_file.c.
Referenced by G_find_raster(), and G_find_vector().
const char* G_find_file2 | ( | const char * | element, |
const char * | name, | ||
const char * | mapset | ||
) |
Searches for a file from the mapset search list or in a specified mapset. (look but don't touch)
Returns the mapset name where the file was found.
Exactly the same as G_find_file() except that if name is in the form "<i>name@mapset</i>", and is found, G_find_file2() will not alter name by removing the "@<i>mapset</i>" part.
Rejects all names that begin with "."
element | database element (eg, "cell", "cellhd", "colr", etc) |
name | file name to look for |
mapset | mapset to search. if mapset is "" will search in mapset search list |
Definition at line 234 of file find_file.c.
Referenced by G_find_raster2(), G_find_vector2(), Gs_load_3dview(), I_find_group(), I_find_group2(), M_find(), V1_close_ogr(), and Vect_close().
const char* G_find_file2_misc | ( | const char * | dir, |
const char * | element, | ||
const char * | name, | ||
const char * | mapset | ||
) |
Searches for a misc file from the mapset search list or in a specified mapset. (look but don't touch)
Returns the mapset name where the misc file was found. Paths to misc files currently follow structure: mapset/dir/name/element
dir | file directory |
element | database element (eg, "cell", "cellhd", "colr", etc) |
name | file name to look for |
mapset | mapset to search. if mapset is "" will search in mapset search list |
Definition at line 257 of file find_file.c.
Referenced by G_find_raster3d(), G_has_raster3d_timestamp(), G_has_raster_timestamp(), I_find_group_file(), I_find_group_file2(), I_find_subgroup(), I_find_subgroup2(), I_find_subgroup_file(), I_find_subgroup_file2(), Rast_read_fp_range(), Rast_read_histogram(), and Rast_read_range().
const char* G_find_file_misc | ( | const char * | dir, |
const char * | element, | ||
char * | name, | ||
const char * | mapset | ||
) |
Searches for a misc file from the mapset search list or in a specified mapset.
Returns the mapset name where the misc file was found. Paths to misc files currently follow structure: mapset/dir/name/element
dir | file directory |
element | database element (eg, "cell", "cellhd", "colr", etc) |
name | file name to look for |
mapset | mapset to search. if mapset is "" will search in mapset search list |
Definition at line 208 of file find_file.c.
Referenced by Rast3d_mask_file_exists().