FAST.Framework  1.0.0
FZip.h
1 /******************************************************************************
2 **
3 ** FAST.Framework
4 **
5 ** Created: 2020.08.29
6 ** Author: Boris Fast
7 ** Mail: Support@FAST-Framework.com
8 **
9 ******************************************************************************/
10 
11 #ifndef FZIP_H
12 #define FZIP_H
13 
14 using namespace std;
15 
16 #include "FObject.h"
17 #include "FString.h"
18 #include "FList.h"
19 
23 class FZip : public FObject
24 {
25  struct Data
26  {
27  FString filename = FString::Empty();
28  FString data = FString::Empty();
29  ULLong size = 0;
30  };
31 
32  public:
33  FZip(const FZip&) = delete;
34  FZip(FZip&&) = delete;
35  FZip() = delete;
36  FZip& operator=(const FZip&) = delete;
37 
38  FZip(const FString& filename);
39  virtual ~FZip() = default;
40 
41  FString Name() const;
42  FString FullName() const;
43 
44  void Add(const FString& path);
45  void Add(FFile& file);
46  void Zip() const;
47  void Print() const;
48  void Unzip() const;
49 
50  static void Print(const FString& filename);
51  static void Unzip(const FString& filename);
52 
53  const type_info& GetType() override;
54  FString GetName() const override;
55 
56  private:
57  FString filename;
58  FList<Data> buffer;
59 };
60 
61 #endif // FZIP_H
FString
Definition: FString.h:21
FZip
Definition: FZip.h:23
FObject
Definition: FObject.h:49
FFile
Definition: FFile.h:43
FList< Data >