ObjFW
OFTarArchiveEntry.h
1 /*
2  * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
3  * Jonathan Schleifer <js@heap.zone>
4  *
5  * All rights reserved.
6  *
7  * This file is part of ObjFW. It may be distributed under the terms of the
8  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
9  * the packaging of this file.
10  *
11  * Alternatively, it may be distributed under the terms of the GNU General
12  * Public License, either version 2 or 3, which can be found in the file
13  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
14  * file.
15  */
16 
17 #import "OFObject.h"
18 #import "OFStream.h"
19 
20 OF_ASSUME_NONNULL_BEGIN
21 
22 @class OFDate;
23 
27 typedef enum of_tar_archive_entry_type_t {
29  OF_TAR_ARCHIVE_ENTRY_TYPE_FILE = '0',
31  OF_TAR_ARCHIVE_ENTRY_TYPE_LINK = '1',
33  OF_TAR_ARCHIVE_ENTRY_TYPE_SYMLINK = '2',
35  OF_TAR_ARCHIVE_ENTRY_TYPE_CHARACTER_DEVICE = '3',
37  OF_TAR_ARCHIVE_ENTRY_TYPE_BLOCK_DEVICE = '4',
39  OF_TAR_ARCHIVE_ENTRY_TYPE_DIRECTORY = '5',
41  OF_TAR_ARCHIVE_ENTRY_TYPE_FIFO = '6',
43  OF_TAR_ARCHIVE_ENTRY_TYPE_CONTIGUOUS_FILE = '7',
44 } of_tar_archive_entry_type_t;
45 
52 {
53  OFStream *_stream;
54  bool _atEndOfStream;
55  OFString *_fileName;
56  uint32_t _mode;
57  uint64_t _size, _toRead;
58  OFDate *_modificationDate;
59  of_tar_archive_entry_type_t _type;
60  OFString *_Nullable _targetFileName;
61  OFString *_Nullable _owner, *_Nullable _group;
62  uint32_t _deviceMajor, _deviceMinor;
63 }
64 
68 @property (readonly, nonatomic) OFString *fileName;
69 
73 @property (readonly, nonatomic) uint32_t mode;
74 
78 @property (readonly, nonatomic) uint64_t size;
79 
83 @property (readonly, nonatomic) OFDate *modificationDate;
84 
90 @property (readonly, nonatomic) of_tar_archive_entry_type_t type;
91 
95 @property (readonly, nonatomic) OFString *targetFileName;
96 
100 @property (readonly, nonatomic) OFString *owner;
101 
105 @property (readonly, nonatomic) OFString *group;
106 
110 @property (readonly, nonatomic) uint32_t deviceMajor;
111 
115 @property (readonly, nonatomic) uint32_t deviceMinor;
116 
117 - init OF_UNAVAILABLE;
118 @end
119 
120 OF_ASSUME_NONNULL_END
OFDate * modificationDate
Definition: OFTarArchiveEntry.h:83
uint32_t mode
Definition: OFTarArchiveEntry.h:73
A class for handling strings.
Definition: OFString.h:114
of_tar_archive_entry_type_t type
Definition: OFTarArchiveEntry.h:90
uint64_t size
Definition: OFTarArchiveEntry.h:78
OFString * group
Definition: OFTarArchiveEntry.h:105
OFString * owner
Definition: OFTarArchiveEntry.h:100
id init()
Initializes an already allocated object.
Definition: OFObject.m:488
uint32_t deviceMajor
Definition: OFTarArchiveEntry.h:110
A class which represents an entry of a tar archive.
Definition: OFTarArchiveEntry.h:51
OFString * targetFileName
Definition: OFTarArchiveEntry.h:95
A class for storing, accessing and comparing dates.
Definition: OFDate.h:30
OFString * fileName
Definition: OFTarArchiveEntry.h:68
uint32_t deviceMinor
Definition: OFTarArchiveEntry.h:115
A base class for different types of streams.
Definition: OFStream.h:88