ObjFW
OFLHAArchiveEntry.h
1 /*
2  * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
3  *
4  * All rights reserved.
5  *
6  * This file is part of ObjFW. It may be distributed under the terms of the
7  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8  * the packaging of this file.
9  *
10  * Alternatively, it may be distributed under the terms of the GNU General
11  * Public License, either version 2 or 3, which can be found in the file
12  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13  * file.
14  */
15 
16 #import "OFObject.h"
17 
18 OF_ASSUME_NONNULL_BEGIN
19 
20 @class OFArray OF_GENERIC(ObjectType);
21 @class OFData;
22 @class OFDate;
23 @class OFMutableArray OF_GENERIC(ObjectType);
24 @class OFNumber;
25 @class OFString;
26 
33 {
34  OFString *_fileName, *_Nullable _directoryName, *_compressionMethod;
35  uint32_t _compressedSize, _uncompressedSize;
36  OFDate *_date;
37  uint8_t _headerLevel;
38  uint16_t _CRC16;
39  uint8_t _operatingSystemIdentifier;
40  OFString *_Nullable _fileComment;
41  OFNumber *_Nullable _mode, *_Nullable _UID, *_Nullable _GID;
42  OFString *_Nullable _owner, *_Nullable _group;
43  OFDate *_Nullable _modificationDate;
44  OFMutableArray OF_GENERIC(OFData *) *_extensions;
45  OF_RESERVE_IVARS(OFLHAArchiveEntry, 4)
46 }
47 
51 @property (readonly, copy, nonatomic) OFString *fileName;
52 
56 @property (readonly, copy, nonatomic) OFString *compressionMethod;
57 
61 @property (readonly, nonatomic) uint32_t compressedSize;
62 
66 @property (readonly, nonatomic) uint32_t uncompressedSize;
67 
71 @property (readonly, retain, nonatomic) OFDate *date;
72 
76 @property (readonly, nonatomic) uint8_t headerLevel;
77 
81 @property (readonly, nonatomic) uint16_t CRC16;
82 
86 @property (readonly, nonatomic) uint8_t operatingSystemIdentifier;
87 
91 @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic)
92  OFString *fileComment;
93 
97 @property OF_NULLABLE_PROPERTY (readonly, retain, nonatomic) OFNumber *mode;
98 
102 @property OF_NULLABLE_PROPERTY (readonly, retain, nonatomic) OFNumber *UID;
103 
107 @property OF_NULLABLE_PROPERTY (readonly, retain, nonatomic) OFNumber *GID;
108 
112 @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *owner;
113 
117 @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *group;
118 
122 @property OF_NULLABLE_PROPERTY (readonly, retain, nonatomic)
123  OFDate *modificationDate;
124 
128 @property (readonly, copy, nonatomic) OFArray OF_GENERIC(OFData *) *extensions;
129 
136 + (instancetype)entryWithFileName: (OFString *)fileName;
137 
138 - (instancetype)init OF_UNAVAILABLE;
139 
147 - (instancetype)initWithFileName: (OFString *)fileName;
148 @end
149 
150 OF_ASSUME_NONNULL_END
151 
152 #import "OFMutableLHAArchiveEntry.h"
An abstract class for storing objects in an array.
Definition: OFArray.h:92
A class for storing arbitrary data in an array.
Definition: OFData.h:40
A class for storing, accessing and comparing dates.
Definition: OFDate.h:36
A class which represents an entry in an LHA archive.
Definition: OFLHAArchiveEntry.h:34
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:44
Provides a way to store a number in an object.
Definition: OFNumber.h:49
The root class for all other classes inside ObjFW.
Definition: OFObject.h:520
A class for handling strings.
Definition: OFString.h:132
A protocol for the creation of copies.
Definition: OFObject.h:1187
A protocol for the creation of mutable copies.
Definition: OFObject.h:1208