GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
file_name.c File Reference

GIS library - Determice GRASS data base file name. More...

#include <string.h>
#include <grass/gis.h>
Include dependency graph for file_name.c:

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)
 

Detailed Description

GIS library - Determice GRASS data base file name.

(C) 2001-2008 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.

Author
Original author CERL

Definition in file file_name.c.

Function Documentation

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 then path is set as if name had been nnn and mapset had been ppp (mapset parameter itself is ignored in this case)

Parameters
[out]pathbuffer to hold resultant full path to file
elementdatabase element (eg, "cell", "cellhd", etc)
namename of file to build path to (fully qualified names allowed)
mapsetmapset name
Returns
pointer to path

Definition at line 33 of file file_name.c.

References G__location_path(), G__name_is_fully_qualified(), G_free(), G_mapset(), render::name, sprintf(), xmapset, and xname.

Referenced by G__make_location(), G__make_mapset_element(), G__mapset_permissions(), G__tempfile(), G_get_ellipsoid_parameters(), G_get_projinfo(), G_get_projunits(), G_myname(), G_raster_map_is_fp(), G_raster_map_type(), G_rename(), I_list_groups(), I_list_subgroups(), main(), V1_open_new_nat(), V2_close_ogr(), Vect__open_old(), Vect_cidx_open(), Vect_cidx_save(), Vect_close(), Vect_coor_info(), Vect_copy(), Vect_open_topo(), Vect_save_spatial_index(), and Vect_save_topo().

char* G__file_name_misc ( char *  path,
const char *  dir,
const char *  element,
const char *  name,
const char *  mapset 
)