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

GIS Library - File remove functions. More...

#include <grass/config.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <grass/gis.h>
Include dependency graph for remove.c:

Go to the source code of this file.

Functions

int G_remove (const char *element, const char *name)
 Remove a database file. More...
 
int G_remove_misc (const char *dir, const char *element, const char *name)
 Remove a database misc file. More...
 

Detailed Description

GIS Library - File remove functions.

(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
GRASS GIS Development Team
Date
1999-2008

Definition in file remove.c.

Function Documentation

int G_remove ( const char *  element,
const char *  name 
)

Remove a database file.

The file or directory name under the database element directory in the current mapset is removed.

Note: If name is a directory, everything within the directory is removed as well.

Parameters
[in]elementelement name
[in]namefile nane
Returns
0 if name does not exist
1 if successful
-1 on error

Definition at line 47 of file remove.c.

References NULL.

Referenced by G3d_removeColor(), G__quant_export(), G_remove_colors(), G_write_colors(), G_write_fp_range(), and if().

int G_remove_misc ( const char *  dir,
const char *  element,
const char *  name 
)

Remove a database misc file.

The file or directory name under the database element directory in the current mapset is removed.

Note: If name is a directory, everything within the directory is removed as well.

Parameters
[in]elementelement name
[in]namefile name
Returns
0 if name does not exist
1 if successful
-1 on error

Definition at line 67 of file remove.c.

Referenced by G__quant_export(), G__remove_fp_range(), G_remove_grid3_timestamp(), G_remove_histogram(), G_remove_raster_timestamp(), G_remove_vector_timestamp(), and G_write_range().