CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoLuminosity/ROOTSchema/interface/FileToolKit.h

Go to the documentation of this file.
00001 #ifndef __FILETOOLKIT_H__
00002 #define __FILETOOLKIT_H__
00003 
00004 #include <vector>
00005 #include <string>
00006 #include <sys/stat.h>
00007 
00008 class FileToolKit{
00009  public:
00010 
00011   FileToolKit(){}
00012   ~FileToolKit(){}
00013   
00014   // HTML specific
00015   void MakeEmptyWebPage(const std::string &fileName,
00016                         const std::string &title);
00017 
00018   // File specific
00019   void InsertLineAfter( const std::string &fileName,
00020                         const std::string &newLine,
00021                         const std::string &searchLine);
00022 
00023   void InsertLineBefore( const std::string &fileName,
00024                          const std::string &newLine,
00025                          const std::string &searchLine);
00026 
00027   bool fileExists( const std::string &fileName );
00028 
00029   // String
00030   void Tokenize(const std::string& str,
00031                 std::vector< std::string >& tokens,
00032                 const std::string& delimiters = std::string(" "));
00033   
00034   // File system specific
00035   int MakeDir( std::string dirName, mode_t writeMode );
00036     
00037 };
00038 #endif