My Project
OSFileUtil.h
Go to the documentation of this file.
1/* $Id$ */
15#ifndef FILEUTIL_H
16#define FILEUTIL_H
17
18
19#include <iostream>
20#include <sstream>
21#include <fstream>
22#include <string>
23
38{
39public:
40public:
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
class used to make it easy to read and write files.
Definition OSFileUtil.h:38
bool writeFileFromString(char *fname, std::string thestring)
write a file from an input string.
std::string getFileAsString(const char *fname)
read a file and return contents as a string.
bool writeFileFromChar(char *fname, char *ch)
write a file from an input char pointer.
~FileUtil()
the class destructor
char * getFileAsChar(const char *fname)
read a file and return contents as a char pointer.
FileUtil()
the class constructor