|
json-gen-c
0.1.5
json-gen-c generate C code for json manipulation
|
File operation helper functions. More...
#include "utils/sstr.h"

Go to the source code of this file.
Functions | |
| int | read_file (const char *filename, sstr_t content) |
| Read the entire contents of a file into a string. | |
| int | write_file (const char *filename, sstr_t content) |
| Write a string to a file, replacing any existing contents. | |
File operation helper functions.
|
extern |
Read the entire contents of a file into a string.
| filename | path to the file to read. |
| content | output sstr_t that receives the file contents. |
|
extern |
Write a string to a file, replacing any existing contents.
| filename | path to the file to write. |
| content | sstr_t containing the data to write. |