10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
* Alternatively, it may be distributed under the terms of the GNU General
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFZIPArchiveEntry.h"
OF_ASSUME_NONNULL_BEGIN
/**
* @class OFMutableZIPArchiveEntry \
* OFMutableZIPArchiveEntry.h ObjFW/OFMutableZIPArchiveEntry.h
*
* @brief A class which represents a mutable entry in the central directory of
* a ZIP archive.
*/
@interface OFMutableZIPArchiveEntry: OFZIPArchiveEntry
{
OF_RESERVE_IVARS(OFMutableZIPArchiveEntry, 4)
}
/**
* @brief The file name of the entry.
*/
@property (readwrite, copy, nonatomic) OFString *fileName;
/**
* @brief The comment of the entry's file.
*/
@property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic)
OFString *fileComment;
/**
* @brief The extra field of the entry.
*
* The item size *must* be 1!
*/
@property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFData *extraField;
|
>
|
<
<
<
<
<
<
<
<
<
<
<
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
* Alternatively, it may be distributed under the terms of the GNU General
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFZIPArchiveEntry.h"
#import "OFMutableArchiveEntry.h"
OF_ASSUME_NONNULL_BEGIN
/**
* @class OFMutableZIPArchiveEntry \
* OFMutableZIPArchiveEntry.h ObjFW/OFMutableZIPArchiveEntry.h
*
* @brief A class which represents a mutable entry in the central directory of
* a ZIP archive.
*/
@interface OFMutableZIPArchiveEntry: OFZIPArchiveEntry <OFMutableArchiveEntry>
{
OF_RESERVE_IVARS(OFMutableZIPArchiveEntry, 4)
}
/**
* @brief The extra field of the entry.
*
* The item size *must* be 1!
*/
@property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFData *extraField;
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
* The lower 8 bits are the ZIP specification version.@n
* The upper 8 bits are the attribute compatibility.
* See @ref OFZIPArchiveEntryAttributeCompatibility.
*/
@property (readwrite, nonatomic)
OFZIPArchiveEntryAttributeCompatibility minVersionNeeded;
/**
* @brief The last modification date of the entry's file.
*
* @note Due to limitations of the ZIP format, this has only 2 second precision.
*/
@property (readwrite, retain, nonatomic) OFDate *modificationDate;
/**
* @brief The compression method of the entry.
*
* Supported values are:
* Value | Description
* --------------------------------------------|---------------
* OFZIPArchiveEntryCompressionMethodNone | No compression
* OFZIPArchiveEntryCompressionMethodDeflate | Deflate
* OFZIPArchiveEntryCompressionMethodDeflate64 | Deflate64
*
* Other values may be returned, but the file cannot be extracted then.
*/
@property (readwrite, nonatomic)
OFZIPArchiveEntryCompressionMethod compressionMethod;
/**
* @brief The compressed size of the entry's file.
*/
@property (readwrite, nonatomic) uint64_t compressedSize;
/**
* @brief The uncompressed size of the entry's file.
*/
@property (readwrite, nonatomic) uint64_t uncompressedSize;
/**
* @brief The CRC32 checksum of the entry's file.
*/
@property (readwrite, nonatomic) uint32_t CRC32;
/**
* @brief The version specific attributes.
*
* The meaning of the version specific attributes depends on the attribute
* compatibility part of the version that made the entry.
*/
@property (readwrite, nonatomic) uint32_t versionSpecificAttributes;
/**
* @brief The general purpose bit flag of the entry.
*
* See the ZIP specification for details.
*/
@property (readwrite, nonatomic) uint16_t generalPurposeBitFlag;
/**
* @brief Converts the OFMutableZIPArchiveEntry to an immutable
* OFZIPArchiveEntry.
*/
- (void)makeImmutable;
@end
OF_ASSUME_NONNULL_END
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
* The lower 8 bits are the ZIP specification version.@n
* The upper 8 bits are the attribute compatibility.
* See @ref OFZIPArchiveEntryAttributeCompatibility.
*/
@property (readwrite, nonatomic)
OFZIPArchiveEntryAttributeCompatibility minVersionNeeded;
/**
* @brief The compression method of the entry.
*
* Supported values are:
* Value | Description
* --------------------------------------------|---------------
* OFZIPArchiveEntryCompressionMethodNone | No compression
* OFZIPArchiveEntryCompressionMethodDeflate | Deflate
* OFZIPArchiveEntryCompressionMethodDeflate64 | Deflate64
*
* Other values may be returned, but the file cannot be extracted then.
*/
@property (readwrite, nonatomic)
OFZIPArchiveEntryCompressionMethod compressionMethod;
/**
* @brief The CRC32 checksum of the entry's file.
*/
@property (readwrite, nonatomic) uint32_t CRC32;
/**
* @brief The version specific attributes.
*
* The meaning of the version specific attributes depends on the attribute
* compatibility part of the version that made the entry.
*/
@property (readwrite, nonatomic) uint32_t versionSpecificAttributes;
/**
* @brief The general purpose bit flag of the entry.
*
* See the ZIP specification for details.
*/
@property (readwrite, nonatomic) uint16_t generalPurposeBitFlag;
/**
* @brief Creates a new OFMutableZIPArchiveEntry with the specified file name.
*
* @param fileName The file name for the OFZIPArchiveEntry
* @return A new, autoreleased OFZIPArchiveEntry
*/
+ (instancetype)entryWithFileName: (OFString *)fileName;
/**
* @brief Initializes an already allocated OFMutableZIPArchiveEntry with the
* specified file name.
*
* @param fileName The file name for the OFZIPArchiveEntry
* @return An initialized OFZIPArchiveEntry
*/
- (instancetype)initWithFileName: (OFString *)fileName;
/**
* @brief Converts the OFMutableZIPArchiveEntry to an immutable
* OFZIPArchiveEntry.
*/
- (void)makeImmutable;
@end
OF_ASSUME_NONNULL_END
|