Fawkes API
Fawkes Development Version
|
25 #ifndef _UTILS_SYSTEM_FILE_H_
26 #define _UTILS_SYSTEM_FILE_H_
28 #include <core/exception.h>
34 class UnableToOpenFileException :
public Exception
static bool exists(const char *filename)
Check if a file exists.
static bool is_regular(const char *filename)
Check if a file is a regular file.
UnableToOpenFileException(const char *filename, int error)
Constructor.
@ ADD_SUFFIX
add a suffix (starting with ".1") to the given filename
const char * filename() const
Get the file's name.
@ OVERWRITE
overwrite the existing file
File(const char *filename, FileOpenMethod method=APPEND)
Constructor.
@ APPEND
append data at the end of the existing file
FILE * stream() const
Get access to the file stream.
FileOpenMethod
What to do when a file with the same name already exists.