ObjFW
Loading...
Searching...
No Matches
OFTarArchiveEntry.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008-2026 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFObject.h"
21#import "OFArchiveEntry.h"
22
23OF_ASSUME_NONNULL_BEGIN
24
26
27@class OFDate;
28@class OFDictionary OF_GENERIC(KeyType, ObjectType);
29@class OFMutableDictionary OF_GENERIC(KeyType, ObjectType);
30@class OFNumber;
31
38#if defined(__clang__) || OF_GCC_VERSION >= 405
39 OF_DEPRECATED(ObjFW, 1, 5, "Use OFArchiveEntryFileType instead")
40#endif
41;
42
43#if OF_GCC_VERSION >= 405
44# pragma GCC diagnostic push
45# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
46#endif
53 OF_DEPRECATED(ObjFW, 1, 5, "Use OFArchiveFileEntryTypeRegular instead") =
55
62 OF_DEPRECATED(ObjFW, 1, 5, "Use OFArchiveEntryFileTypeLink instead") =
64
71 OF_DEPRECATED(ObjFW, 1, 5,
72 "Use OFArchiveEntryFileTypeSymbolicLink instead") =
74
81 OF_DEPRECATED(ObjFW, 1, 5,
82 "Use OFArchiveEntryFileTypeCharacterDevice instead") =
84
91 OF_DEPRECATED(ObjFW, 1, 5,
92 "Use OFArchiveEntryFileTypeBlockDevice instead") =
94
101 OF_DEPRECATED(ObjFW, 1, 5, "Use OFArchiveEntryFileTypeDirectory instead") =
103
110 OF_DEPRECATED(ObjFW, 1, 5, "Use OFArchiveEntryFileTypeFIFO instead") =
112
119 OF_DEPRECATED(ObjFW, 1, 5,
120 "Use OFArchiveEntryFileTypeContiguousFile instead") =
122#if OF_GCC_VERSION >= 405
123# pragma GCC diagnostic pop
124#endif
125
133{
134 OFString *_fileName;
135 OFNumber *_POSIXPermissions, *_ownerAccountID, *_groupOwnerAccountID;
136 unsigned long long _compressedSize, _uncompressedSize;
137 OFDate *_modificationDate;
138 OFArchiveEntryFileType _fileType;
139 OFString *_Nullable _targetFileName;
140 OFString *_Nullable _ownerAccountName;
141 OFString *_Nullable _groupOwnerAccountName;
142 unsigned long _deviceMajor, _deviceMinor;
143 OFMutableDictionary OF_GENERIC(OFString *, OFData *) *_extendedHeader;
144 OF_RESERVE_IVARS(OFTarArchiveEntry, 3)
145}
146
152#if OF_GCC_VERSION >= 405
153# pragma GCC diagnostic push
154# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
155#endif
156@property (readonly, nonatomic) OFTarArchiveEntryType type
157 OF_DEPRECATED(ObjFW, 1, 5, "Use -[OFArchiveEntry fileType] instead");
158#if OF_GCC_VERSION >= 405
159# pragma GCC diagnostic pop
160#endif
161
167@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic)
168 OFDictionary OF_GENERIC(OFString *, OFData *) *extendedHeader;
169
173@property OF_NULLABLE_PROPERTY (readonly, retain, nonatomic)
174 OFNumber *amigaProtection;
175
179@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic)
180 OFString *amigaComment;
181
182- (instancetype)init OF_UNAVAILABLE;
183@end
184
185OF_ASSUME_NONNULL_END
186
187#import "OFMutableTarArchiveEntry.h"
OFArchiveEntryFileType
The file type of an archive entry.
Definition OFArchiveEntry.h:36
static const OFTarArchiveEntryType OFTarArchiveEntryTypeDirectory
Directory.
Definition OFTarArchiveEntry.h:101
OFArchiveEntryFileType OFTarArchiveEntryType
The type of the archive entry.
Definition OFTarArchiveEntry.h:41
static const OFTarArchiveEntryType OFTarArchiveEntryTypeFIFO
FIFO.
Definition OFTarArchiveEntry.h:110
static const OFTarArchiveEntryType OFTarArchiveEntryTypeBlockDevice
Block device.
Definition OFTarArchiveEntry.h:92
static const OFTarArchiveEntryType OFTarArchiveEntryTypeFile
Normal file.
Definition OFTarArchiveEntry.h:53
static const OFTarArchiveEntryType OFTarArchiveEntryTypeContiguousFile
Contiguous file.
Definition OFTarArchiveEntry.h:120
static const OFTarArchiveEntryType OFTarArchiveEntryTypeCharacterDevice
Character device.
Definition OFTarArchiveEntry.h:82
static const OFTarArchiveEntryType OFTarArchiveEntryTypeLink
Hard link.
Definition OFTarArchiveEntry.h:62
static const OFTarArchiveEntryType OFTarArchiveEntryTypeSymlink
Symbolic link.
Definition OFTarArchiveEntry.h:72
A class for storing arbitrary data in an array.
Definition OFData.h:46
A class for storing, accessing and comparing dates.
Definition OFDate.h:34
An abstract class for storing objects in a dictionary.
Definition OFDictionary.h:84
An abstract class for storing and changing objects in a dictionary.
Definition OFMutableDictionary.h:48
Provides a way to store a number in an object.
Definition OFNumber.h:47
The root class for all other classes inside ObjFW.
Definition OFObject.h:956
A class for handling strings.
Definition OFString.h:143
A class which represents an entry of a tar archive.
Definition OFTarArchiveEntry.h:134
A class which represents an entry in an archive.
Definition OFArchiveEntry.h:66
A protocol for the creation of copies.
Definition OFObject.h:1618
A protocol for the creation of mutable copies.
Definition OFObject.h:1639