OS  2.9.3
OSFileUtil.h
Go to the documentation of this file.
1 /* $Id: OSFileUtil.h 4926 2015-01-28 21:50:12Z Gassmann $ */
15 #ifndef FILEUTIL_H
16 #define FILEUTIL_H
17 
18 
19 #include <iostream>
20 #include <sstream>
21 #include <fstream>
22 #include <string>
23 
37 class FileUtil
38 {
39 public:
40 public:
41 
43  FileUtil();
44 
46  ~FileUtil();
47 
54  std::string getFileAsString(const char* fname);
55 
62  char* getFileAsChar(const char* fname);
63 
71  bool writeFileFromString(char* fname, std::string thestring);
72 
80  bool writeFileFromString(std::string fname, std::string thestring);
81 
89  bool writeFileFromChar(char* fname, char* ch);
90 };//class FileUtil
91 #endif
char * getFileAsChar(const char *fname)
read a file and return contents as a char pointer.
bool writeFileFromString(char *fname, std::string thestring)
write a file from an input string.
FileUtil()
the class constructor
std::string getFileAsString(const char *fname)
read a file and return contents as a string.
~FileUtil()
the class destructor
bool writeFileFromChar(char *fname, char *ch)
write a file from an input char pointer.
class used to make it easy to read and write files.
Definition: OSFileUtil.h:37