GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72846
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
copy_file.c File Reference
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <grass/gis.h>
Include dependency graph for copy_file.c:

Go to the source code of this file.


int G_copy_file (const char *infile, const char *outfile)
 Copies one file to another. More...

Function Documentation

int G_copy_file ( const char *  infile,
const char *  outfile 

Copies one file to another.

Creates a copy of a file. The destination file will be overwritten if it already exists, so the calling module should check this first if it is important.

infileString containing path to source file
outfileString containing path to destination file
1 on success; 0 if an error occurred (warning will be printed)

Definition at line 34 of file copy_file.c.

References fclose(), G_warning(), and NULL.

Referenced by G_rename_file().