tesseract  5.0.0-alpha-619-ge9db
file Class Reference

#include <include_gunit.h>

Inheritance diagram for file:
tesseract::File

Static Public Member Functions

static bool WriteStringToFile (const std::string &contents, const std::string &filename)
 
static bool GetContents (const std::string &filename, std::string *out, int)
 
static bool SetContents (const std::string &name, const std::string &contents, bool)
 
static int Defaults ()
 
static std::string JoinPath (const std::string &s1, const std::string &s2)
 
static std::string JoinPath (const std::string &s1, const std::string &s2, const std::string &s3)
 
- Static Public Member Functions inherited from tesseract::File
static FILE * OpenOrDie (const std::string &filename, const std::string &mode)
 
static FILE * Open (const std::string &filename, const std::string &mode)
 
static void WriteStringToFileOrDie (const std::string &str, const std::string &filename)
 
static bool Readable (const std::string &filename)
 
static bool ReadFileToString (const std::string &filename, std::string *out)
 
static std::string JoinPath (const std::string &prefix, const std::string &suffix)
 
static bool Delete (const char *pathname)
 
static bool DeleteMatchingFiles (const char *pattern)
 

Detailed Description

Definition at line 22 of file include_gunit.h.

Member Function Documentation

◆ Defaults()

static int file::Defaults ( )
inlinestatic

Definition at line 39 of file include_gunit.h.

39  {
40  return 0;
41  }

◆ GetContents()

static bool file::GetContents ( const std::string filename,
std::string out,
int   
)
inlinestatic

Definition at line 31 of file include_gunit.h.

31  {
32  return File::ReadFileToString(filename, out);
33  }

◆ JoinPath() [1/2]

static std::string file::JoinPath ( const std::string s1,
const std::string s2 
)
inlinestatic

Definition at line 43 of file include_gunit.h.

43  {
44  return tesseract::File::JoinPath(s1, s2);
45  }

◆ JoinPath() [2/2]

static std::string file::JoinPath ( const std::string s1,
const std::string s2,
const std::string s3 
)
inlinestatic

Definition at line 47 of file include_gunit.h.

48  {
49  return JoinPath(JoinPath(s1, s2), s3);
50  }

◆ SetContents()

static bool file::SetContents ( const std::string name,
const std::string contents,
bool   
)
inlinestatic

Definition at line 35 of file include_gunit.h.

35  {
36  return WriteStringToFile(contents, name);
37  }

◆ WriteStringToFile()

static bool file::WriteStringToFile ( const std::string contents,
const std::string filename 
)
inlinestatic

Definition at line 26 of file include_gunit.h.

26  {
27  File::WriteStringToFileOrDie(contents, filename);
28  return true;
29  }

The documentation for this class was generated from the following file:
file::JoinPath
static std::string JoinPath(const std::string &s1, const std::string &s2)
Definition: include_gunit.h:43
tesseract::File::JoinPath
static std::string JoinPath(const std::string &prefix, const std::string &suffix)
Definition: fileio.cpp:98
file::WriteStringToFile
static bool WriteStringToFile(const std::string &contents, const std::string &filename)
Definition: include_gunit.h:26