| 93 |
cycrow |
1 |
#pragma once
|
|
|
2 |
|
|
|
3 |
#include "lists.h"
|
|
|
4 |
#include "Utils/String.h"
|
|
|
5 |
#include "StringList.h"
|
|
|
6 |
|
|
|
7 |
class C_File;
|
|
|
8 |
class CBaseFile;
|
|
|
9 |
class CProgressInfo;
|
|
|
10 |
|
|
|
11 |
namespace SPK {
|
|
|
12 |
|
|
|
13 |
class COriginalFiles
|
|
|
14 |
{
|
|
|
15 |
private:
|
|
|
16 |
CLinkList<C_File> _lFiles;
|
|
|
17 |
|
|
|
18 |
Utils::String _sDir;
|
|
|
19 |
|
|
|
20 |
public:
|
|
|
21 |
COriginalFiles(const Utils::String &dir);
|
|
|
22 |
~COriginalFiles(void);
|
|
|
23 |
|
|
|
24 |
int count() const;
|
|
|
25 |
bool isOriginal(C_File *f) const;
|
|
|
26 |
|
|
|
27 |
void backup(CBaseFile *package, CyStringList *errors);
|
|
|
28 |
bool backupFile(C_File *f, CyStringList *errors);
|
|
|
29 |
bool doBackup(C_File *f, CyStringList *errors);
|
|
|
30 |
int restoreAll(CProgressInfo *info, int files, int max);
|
|
|
31 |
bool restoreFile(C_File *f, CyStringList *errors);
|
|
|
32 |
|
|
|
33 |
void parse(const Utils::String &data);
|
|
|
34 |
void update(bool bForce, const CLinkList<C_File> *pFiles);
|
|
|
35 |
bool writeData(CyStringList *lines);
|
|
|
36 |
|
|
|
37 |
void reset();
|
|
|
38 |
|
|
|
39 |
private:
|
|
|
40 |
void _storeFiles(int filetype, const Utils::String &searchPath, const CLinkList<C_File> *pFiles);
|
|
|
41 |
void _add(int filetype, const Utils::String &filename, const Utils::String &searchPath, const CLinkList<C_File> *pFiles);
|
|
|
42 |
C_File *_getFile(C_File *file) const;
|
|
|
43 |
};
|
|
|
44 |
|
|
|
45 |
}
|