find_file.c File Reference

#include <string.h>
#include <unistd.h>
#include <grass/gis.h>

Include dependency graph for find_file.c:

Go to the source code of this file.

Functions

char * G_find_file (char *element, char *name, 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.
char * G_find_file2 (char *element, char *name, 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. Exactly the same as G_find_file() except that if name is in the form nnn in ppp, and is found, name is changed to nnn by G_find_file().


Function Documentation

char* G_find_file ( char *  element,
char *  name,
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.

note: rejects all names that begin with .

If name is of the form nnn in ppp then only mapset ppp is searched

Parameters:
char *element database element (eg, "cell", "cellhd", "colr", etc)
char *name file name to look for
char *mapset mapset to search. if mapset is "" will search in mapset search list
searches for a file from the mapset search list or in a specified mapset. returns the mapset name where the file was found.

Returns:
char * pointer to a string with name of mapset where file was found, or NULL if not found

Definition at line 103 of file find_file.c.

References G__name_is_fully_qualified().

Referenced by G__open(), G_find_cell(), G_find_vector(), and G_read_histogram().

char* G_find_file2 ( char *  element,
char *  name,
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. Exactly the same as G_find_file() except that if name is in the form nnn in ppp, and is found, name is changed to nnn by G_find_file().

note: rejects all names that begin with .

Parameters:
char *element database element (eg, "cell", "cellhd", "colr", etc)
char *name file name to look for
char *mapset mapset to search. if mapset is "" will search in mapset search list
searches for a file from the mapset search list or in a specified mapset. returns the mapset name where the file was found.

Returns:
char * pointer to a string with name of mapset where file was found, or NULL if not found

Definition at line 143 of file find_file.c.

Referenced by G_find_cell2(), G_find_vector2(), G_get_3dview(), G_read_fp_range(), and G_read_range().


Generated on Sun Apr 6 17:32:18 2008 for GRASS by  doxygen 1.5.5