GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
|
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>
Go to the source code of this file.
Functions | |
int | G_remove (const char *element, const char *name) |
Remove a database file. | |
int | G_remove_misc (const char *dir, const char *element, const char *name) |
Remove a database misc file. | |
int | G_recursive_remove (const char *path) |
Recursively remove all files in given directory. | |
GIS Library - File remove functions.
(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 remove.c.
int G_recursive_remove | ( | const char * | path | ) |
Recursively remove all files in given directory.
Equivalent to rm -rf path.
path | path to the directory which should be removed |
Definition at line 113 of file remove.c.
References G_lstat(), G_recursive_remove(), and NULL.
Referenced by G_recursive_remove().
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.
If name is a directory, everything within the directory is removed as well.
element | element name |
name | file name |
Definition at line 44 of file remove.c.
Referenced by G_remove_vector_timestamp(), M_do_copy(), M_do_remove(), and M_do_rename().
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.
If name is a directory, everything within the directory is removed as well.
element | element name |
name | file name |
Definition at line 65 of file remove.c.
References name.
Referenced by G_remove_raster3d_timestamp(), and G_remove_raster_timestamp().