CMS 3D CMS Logo

FileToolKit.h

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

Generated on Tue Jun 9 17:44:03 2009 for CMSSW by  doxygen 1.5.4