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);
bool LoadFileLinesToStrings(const char *filename, GenericVector< STRING > *lines)
bool LoadDataFromFile(const char *filename, GenericVector< char > *data)
void split(char c, GenericVector< STRING > *splited)
static bool DeleteMatchingFiles(const char *pattern)
static FILE * OpenOrDie(const std::string &filename, const std::string &mode)
static std::string JoinPath(const std::string &prefix, const std::string &suffix)
static bool Delete(const char *pathname)
static bool Readable(const std::string &filename)
static bool ReadFileToString(const std::string &filename, std::string *out)
static void WriteStringToFileOrDie(const std::string &str, const std::string &filename)
static FILE * Open(const std::string &filename, const std::string &mode)
bool Read(std::string *out)
void WriteString(const std::string &str)