diff options
Diffstat (limited to 'src/util/os_file.h')
-rw-r--r-- | src/util/os_file.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util/os_file.h b/src/util/os_file.h index 2f97c19ed55..d691302d12d 100644 --- a/src/util/os_file.h +++ b/src/util/os_file.h @@ -8,11 +8,22 @@ #ifndef _OS_FILE_H_ #define _OS_FILE_H_ +#include <stdio.h> + #ifdef __cplusplus extern "C" { #endif /* + * Create a new file and opens it for writing-only. + * If the given filename already exists, nothing is done and NULL is returned. + * `errno` gets set to the failure reason; if that is not EEXIST, the caller + * might want to do something other than trying again. + */ +FILE * +os_file_create_unique(const char *filename, int filemode); + +/* * Read a file. * Returns a char* that the caller must free(), or NULL and sets errno. */ |