17 #ifndef TESSERACT_TRAINING_FILEIO_H_
18 #define TESSERACT_TRAINING_FILEIO_H_
24 #ifdef USE_STD_NAMESPACE
36 static FILE*
Open(
const string& filename,
const string& mode);
43 static bool Readable(
const string& filename);
51 static string JoinPath(
const string& prefix,
const string& suffix);
53 static bool Delete(
const char* pathname);
69 bool Read(
string* out);
101 #endif // TESSERACT_TRAINING_FILEIO_H_
static bool ReadFileToString(const string &filename, string *out)
void WriteString(const string &str)
static bool Readable(const string &filename)
static string JoinPath(const string &prefix, const string &suffix)
static bool Delete(const char *pathname)
static FILE * OpenOrDie(const string &filename, const string &mode)
static void WriteStringToFileOrDie(const string &str, const string &filename)
static bool DeleteMatchingFiles(const char *pattern)
static FILE * Open(const string &filename, const string &mode)
OutputBuffer(FILE *stream)
static void ReadFileToStringOrDie(const string &filename, string *out)
InputBuffer(FILE *stream)