Go to the documentation of this file.
16 #ifndef TESSERACT_TRAINING_FILEIO_H_
17 #define TESSERACT_TRAINING_FILEIO_H_
38 lines_str.split(
'\n', lines);
47 static FILE*
OpenOrDie(
const std::string& filename,
const std::string& mode);
48 static FILE*
Open(
const std::string& filename,
const std::string& mode);
55 static bool Readable(
const std::string& filename);
62 static std::string
JoinPath(
const std::string& prefix,
const std::string& suffix);
64 static bool Delete(
const char* pathname);
80 bool Read(std::string* out);
111 #endif // TESSERACT_TRAINING_FILEIO_H_
static bool DeleteMatchingFiles(const char *pattern)
bool LoadDataFromFile(const char *filename, GenericVector< char > *data)
static bool Readable(const std::string &filename)
static FILE * OpenOrDie(const std::string &filename, const std::string &mode)
OutputBuffer(FILE *stream)
static FILE * Open(const std::string &filename, const std::string &mode)
static void WriteStringToFileOrDie(const std::string &str, const std::string &filename)
bool LoadFileLinesToStrings(const char *filename, GenericVector< STRING > *lines)
InputBuffer(FILE *stream)
static bool ReadFileToString(const std::string &filename, std::string *out)
void WriteString(const std::string &str)
static bool Delete(const char *pathname)
bool Read(std::string *out)
static std::string JoinPath(const std::string &prefix, const std::string &suffix)