/* ---------------------------------------------------- */
/* Header-file DBSYS 1.0, (C) Wabnig Harald, 15.12.2002 */
/* ---------------------------------------------------- */

#ifndef DBIO_INCLUDE
#define DBIO_INCLUDE

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* -------------------------------------------------------------------------- */
/* File-Input-Output                                                          */
/* -------------------------------------------------------------------------- */

extern int Directory_Empty(char * dir);
extern int File_Exists(char * filename);
extern int File_Delete(char * filename);

extern FILE * File_Read_Open(char * fn);
extern FILE * File_Write_Open(char * fn);
extern FILE * File_Append_Open(char * fn);

extern int File_Close(FILE * fp);

extern int File_Write(FILE * fp, char * strg);
extern int File_Contents(char * filename, char * data);
extern int File_Add_Contents(char * filename, char * data);

/* initial and incremental size of the file-data-buffer*/
#define DBIO_BUFFER_MIN	    10000
#define DBIO_BUFFER_MORE	  100000

extern char * File_Get_Contents(char * filename);

#endif

