Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:05

0001 /*
0002  * FileIO.h
0003  *
0004  *  Created on: Sep 25, 2012
0005  *      Author: aspataru
0006  */
0007 
0008 #ifndef FILEIO_H_
0009 #define FILEIO_H_
0010 
0011 #include <string>
0012 #include <vector>
0013 
0014 namespace jsoncollector {
0015   class FileIO {
0016   public:
0017     /**
0018    * Writes given string to specified file path
0019    */
0020     static void writeStringToFile(std::string const& filename, std::string& content);
0021     /**
0022    * Reads string from specified path, returns false if file does not exist
0023    */
0024     static bool readStringFromFile(std::string const& filename, std::string& content);
0025     /**
0026    * Checks if path points to an existing file
0027    */
0028     static bool fileExists(std::string const& path);
0029   };
0030 }  // namespace jsoncollector
0031 #endif /* FILEIO_H_ */