FAST.Framework  1.0.0
FZip.h
1 /******************************************************************************
2 **
3 ** FAST.Framework
4 **
5 ** Created: 2023-10-11
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
Definition: FFile.h:44
Definition: FObject.h:50
Definition: FString.h:22
static const FString Empty()
Returns a empty string.
Definition: FString.h:106
Definition: FZip.h:24
FZip()=delete
Delete standard constructor.
FZip(FZip &&)=delete
Delete standard constructor.
FZip & operator=(const FZip &)=delete
Delete copy operator.
FZip(const FZip &)=delete
Delete standard constructor.
virtual ~FZip()=default
Destroy zip object.