Refactor twrpTar to use TarList
Eliminate the use of tarDirs and Generate_MultipleArcives in
favor of Generate_TarList so that we have one method for backup
creation instead of three.
Change-Id: I267937b6e40b32d43fbac8b4cca82f7468d4f94c
diff --git a/twrpTar.hpp b/twrpTar.hpp
index fa3d2ce..17f6959 100644
--- a/twrpTar.hpp
+++ b/twrpTar.hpp
@@ -47,10 +47,10 @@
virtual ~twrpTar();
int createTarFork();
int extractTarFork();
- int splitArchiveFork();
void setexcl(string exclude);
void setfn(string fn);
void setdir(string dir);
+ void setsize(unsigned long long backup_size);
unsigned long long uncompressedSize();
public:
@@ -68,22 +68,19 @@
int addFile(string fn, bool include_root);
int entryExists(string entry);
int closeTar();
- int create();
- int Split_Archive();
int removeEOT(string tarFile);
int extractTar();
- int tarDirs(bool include_root);
- int Generate_Multiple_Archives(string Path);
string Strip_Root_Dir(string Path);
int openTar();
int Generate_TarList(string Path, std::vector<TarListStruct> *TarList, unsigned long long *Target_Size, unsigned *thread_id);
static void* createList(void *cookie);
static void* extractMulti(void *cookie);
- int tarList(bool include_root, std::vector<TarListStruct> *TarList, unsigned thread_id);
+ int tarList(std::vector<TarListStruct> *TarList, unsigned thread_id);
- int Archive_File_Count;
int Archive_Current_Type;
unsigned long long Archive_Current_Size;
+ unsigned long long Total_Backup_Size;
+ bool include_root_dir;
TAR *t;
int fd;
pid_t pigz_pid;
@@ -94,7 +91,6 @@
string basefn;
vector <string> tarexclude;
- vector<string> split;
std::vector<TarListStruct> *ItemList;
int thread_id;