ObjFW
OFTarArchiveEntry.h
Go to the documentation of this file.
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 
22 @class OFDate;
23 
45 
52 {
53  OFString *_fileName;
54  unsigned long _mode;
55  unsigned long long _size;
56  unsigned long _UID, _GID;
57  OFDate *_modificationDate;
59  OFString *_Nullable _targetFileName;
60  OFString *_Nullable _owner, *_Nullable _group;
61  unsigned long _deviceMajor, _deviceMinor;
62  OF_RESERVE_IVARS(OFTarArchiveEntry, 4)
63 }
64 
68 @property (readonly, copy, nonatomic) OFString *fileName;
69 
73 @property (readonly, nonatomic) unsigned long mode;
74 
78 @property (readonly, nonatomic) unsigned long UID;
79 
83 @property (readonly, nonatomic) unsigned long GID;
84 
88 @property (readonly, nonatomic) unsigned long long size;
89 
93 @property (readonly, retain, nonatomic) OFDate *modificationDate;
94 
100 @property (readonly, nonatomic) of_tar_archive_entry_type_t type;
101 
105 @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic)
106  OFString *targetFileName;
107 
111 @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *owner;
112 
116 @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *group;
117 
121 @property (readonly, nonatomic) unsigned long deviceMajor;
122 
126 @property (readonly, nonatomic) unsigned long deviceMinor;
127 
134 + (instancetype)entryWithFileName: (OFString *)fileName;
135 
136 - (instancetype)init OF_UNAVAILABLE;
137 
145 - (instancetype)initWithFileName: (OFString *)fileName;
146 @end
147 
148 OF_ASSUME_NONNULL_END
149 
150 #import "OFMutableTarArchiveEntry.h"
of_tar_archive_entry_type_t
The type of the archive entry.
Definition: OFTarArchiveEntry.h:27
@ OF_TAR_ARCHIVE_ENTRY_TYPE_SYMLINK
Definition: OFTarArchiveEntry.h:33
@ OF_TAR_ARCHIVE_ENTRY_TYPE_CONTIGUOUS_FILE
Definition: OFTarArchiveEntry.h:43
@ OF_TAR_ARCHIVE_ENTRY_TYPE_FIFO
Definition: OFTarArchiveEntry.h:41
@ OF_TAR_ARCHIVE_ENTRY_TYPE_DIRECTORY
Definition: OFTarArchiveEntry.h:39
@ OF_TAR_ARCHIVE_ENTRY_TYPE_CHARACTER_DEVICE
Definition: OFTarArchiveEntry.h:35
@ OF_TAR_ARCHIVE_ENTRY_TYPE_BLOCK_DEVICE
Definition: OFTarArchiveEntry.h:37
@ OF_TAR_ARCHIVE_ENTRY_TYPE_FILE
Definition: OFTarArchiveEntry.h:29
@ OF_TAR_ARCHIVE_ENTRY_TYPE_LINK
Definition: OFTarArchiveEntry.h:31
A class for storing, accessing and comparing dates.
Definition: OFDate.h:36
The root class for all other classes inside ObjFW.
Definition: OFObject.h:520
A class for handling strings.
Definition: OFString.h:132
A class which represents an entry of a tar archive.
Definition: OFTarArchiveEntry.h:53
A protocol for the creation of copies.
Definition: OFObject.h:1187
A protocol for the creation of mutable copies.
Definition: OFObject.h:1208