ObjFW
src
OFTarArchive.h
1
/*
2
* Copyright (c) 2008-2024 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
#import "
OFString.h
"
18
#import "
OFTarArchiveEntry.h
"
19
20
OF_ASSUME_NONNULL_BEGIN
21
22
@class
OFIRI
;
23
@class
OFStream
;
24
30
OF_SUBCLASSING_RESTRICTED
31
@interface
OFTarArchive
:
OFObject
32
{
33
OFStream
*_stream;
34
uint_least8_t _mode;
35
OFStringEncoding
_encoding;
36
OFTarArchiveEntry
*_Nullable _currentEntry;
37
#ifdef OF_TAR_ARCHIVE_M
38
@public
39
#endif
40
OFStream
*_Nullable _lastReturnedStream;
41
}
42
46
@property
(nonatomic)
OFStringEncoding
encoding;
47
61
+ (instancetype)archiveWithStream: (
OFStream
*)stream mode: (
OFString
*)mode;
62
75
+ (instancetype)archiveWithIRI: (
OFIRI
*)IRI mode: (
OFString
*)mode;
76
86
+ (
OFIRI
*)IRIForFilePath: (
OFString
*)path inArchiveWithIRI: (
OFIRI
*)IRI;
87
88
- (instancetype)init OF_UNAVAILABLE;
89
104
- (instancetype)initWithStream: (
OFStream
*)stream
105
mode: (
OFString
*)mode OF_DESIGNATED_INITIALIZER;
106
120
- (instancetype)initWithIRI: (
OFIRI
*)IRI mode: (
OFString
*)mode;
121
138
- (nullable
OFTarArchiveEntry
*)nextEntry;
139
150
- (
OFStream
*)streamForReadingCurrentEntry;
151
169
- (
OFStream
*)streamForWritingEntry: (
OFTarArchiveEntry
*)entry;
170
176
- (void)close;
177
@end
178
179
OF_ASSUME_NONNULL_END
OFObject.h
OFString.h
OFStringEncoding
OFStringEncoding
The encoding of a string.
Definition:
OFString.h:61
OFTarArchiveEntry.h
OFIRI
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition:
OFIRI.h:37
OFObject
The root class for all other classes inside ObjFW.
Definition:
OFObject.h:688
OFStream
A base class for different types of streams.
Definition:
OFStream.h:188
OFString
A class for handling strings.
Definition:
OFString.h:135
OFTarArchiveEntry
A class which represents an entry of a tar archive.
Definition:
OFTarArchiveEntry.h:56
OFTarArchive
A class for accessing and manipulating tar archives.
Definition:
OFTarArchive.h:32
Generated by
1.9.1