39 ret = rename(oldname, newname);
44 if (remove(oldname) != -1)
72 char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
73 char from[GPATH_MAX], to[GPATH_MAX];
78 strcmp(mapset, xmapset))
81 strcmp(mapset, xmapset))
int G_copy_file(const char *infile, const char *outfile)
Copies one file to another.
char * G_file_name(char *path, const char *element, const char *name, const char *mapset)
Builds full path names to GIS data files.
const char * G_mapset(void)
Get current mapset name.
int G_name_is_fully_qualified(const char *fullname, char *name, char *mapset)
Check if map name is fully qualified (map @ mapset)
int G_rename_file(const char *oldname, const char *newname)
Rename a file or a directory in the filesystem.
int G_rename(const char *element, const char *oldname, const char *newname)
Rename a database file.