initial commit, lordsawar source, slightly modified
[lordsawar] / src / tarhelper.h
1 #include <libtar.h>
2 #include <string>
3 #include <iostream>
4 #include <list>
5 class Tar_Helper
6 {
7 public:
8
9     //! Constructor
10     Tar_Helper(std::string file, std::ios::openmode mode);
11
12     //! Destructor
13     ~Tar_Helper();
14
15     bool saveFile(std::string file, std::string destfile = "");
16
17     std::string getFile(std::string filename, bool &broken);
18
19     std::string getFirstFile(bool &broken);
20
21     std::list<std::string> getFilenamesWithExtension(std::string ext);
22
23     std::list<std::string> getFilenames();
24
25     void Close();
26 private:
27
28     // DATA
29     TAR *t;
30     std::ios::openmode openmode;
31     std::string tmpoutdir;
32 };