CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FileToolKit.h
Go to the documentation of this file.
1 #ifndef __FILETOOLKIT_H__
2 #define __FILETOOLKIT_H__
3 
4 #include <vector>
5 #include <string>
6 #include <sys/stat.h>
7 
8 class FileToolKit{
9  public:
10 
13 
14  // HTML specific
15  void MakeEmptyWebPage(const std::string &fileName,
16  const std::string &title);
17 
18  // File specific
19  void InsertLineAfter( const std::string &fileName,
20  const std::string &newLine,
21  const std::string &searchLine);
22 
23  void InsertLineBefore( const std::string &fileName,
24  const std::string &newLine,
25  const std::string &searchLine);
26 
27  bool fileExists( const std::string &fileName );
28 
29  // String
30  void Tokenize(const std::string& str,
31  std::vector< std::string >& tokens,
32  const std::string& delimiters = std::string(" "));
33 
34  // File system specific
35  int MakeDir( std::string dirName, mode_t writeMode );
36 
37 };
38 #endif
void InsertLineAfter(const std::string &fileName, const std::string &newLine, const std::string &searchLine)
Definition: FileToolKit.cc:96
int MakeDir(std::string dirName, mode_t writeMode)
Definition: FileToolKit.cc:38
bool fileExists(const std::string &fileName)
Definition: FileToolKit.cc:173
void InsertLineBefore(const std::string &fileName, const std::string &newLine, const std::string &searchLine)
Definition: FileToolKit.cc:136
void Tokenize(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=std::string(" "))
Definition: FileToolKit.cc:16
void MakeEmptyWebPage(const std::string &fileName, const std::string &title)
Definition: FileToolKit.cc:78