GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
|
GIS library - Find GRASS data base files. More...
#include <string.h>
#include <unistd.h>
#include <grass/gis.h>
#include <grass/glocale.h>
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. | |
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. | |
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) | |
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) | |
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(), G_find_vector(), IL_output_2d(), IL_resample_output_2d(), and S_read().
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(), G_get_3dview(), Gs_load_3dview(), IL_resample_output_2d(), and M_find().
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.
References name.
Referenced by G_find_raster3d(), G_has_raster3d_timestamp(), and G_has_raster_timestamp().
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.
References name.