json-gen-c  0.1.5
json-gen-c generate C code for json manipulation
io.h
Go to the documentation of this file.
1
6#ifndef UTILS_IO_H_
7#define UTILS_IO_H_
8
9#include "utils/sstr.h"
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
22extern int read_file(const char* filename, sstr_t content);
23
31extern int write_file(const char* filename, sstr_t content);
32
33#ifdef __cplusplus
34}
35#endif
36
37#endif // UTILS_IO_H_
int read_file(const char *filename, sstr_t content)
Read the entire contents of a file into a string.
Definition io.c:6
int write_file(const char *filename, sstr_t content)
Write a string to a file, replacing any existing contents.
Definition io.c:36
sstr_t are objects that represent sequences of characters.
void * sstr_t
sstr_t are objects that represent sequences of characters.
Definition sstr.h:75