1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* Copyright (c) 2008-2022 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE.QPL included in
* the packaging of this file.
*
* Alternatively, it may be distributed under the terms of the GNU General
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFObject.h"
#import "OFKernelEventObserver.h"
#import "OFLHAArchiveEntry.h"
#import "OFString.h"
OF_ASSUME_NONNULL_BEGIN
@class OFStream;
@class OFURI;
/**
* @class OFLHAArchive OFLHAArchive.h ObjFW/OFLHAArchive.h
*
* @brief A class for accessing and manipulating LHA files.
*/
OF_SUBCLASSING_RESTRICTED
|
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* Copyright (c) 2008-2023 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE.QPL included in
* the packaging of this file.
*
* Alternatively, it may be distributed under the terms of the GNU General
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#import "OFObject.h"
#import "OFKernelEventObserver.h"
#import "OFLHAArchiveEntry.h"
#import "OFString.h"
OF_ASSUME_NONNULL_BEGIN
@class OFIRI;
@class OFStream;
/**
* @class OFLHAArchive OFLHAArchive.h ObjFW/OFLHAArchive.h
*
* @brief A class for accessing and manipulating LHA files.
*/
OF_SUBCLASSING_RESTRICTED
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
* @return A new, autoreleased OFLHAArchive
*/
+ (instancetype)archiveWithStream: (OFStream *)stream mode: (OFString *)mode;
/**
* @brief Creates a new OFLHAArchive object with the specified file.
*
* @param URI The URI to the LHA file
* @param mode The mode for the LHA file. Valid modes are "r" for reading,
* "w" for creating a new file and "a" for appending to an existing
* archive.
* @return A new, autoreleased OFLHAArchive
*/
+ (instancetype)archiveWithURI: (OFURI *)URI mode: (OFString *)mode;
/**
* @brief Creates a URI for accessing a the specified file within the specified
* LHA archive.
*
* @param path The path of the file within the archive
* @param URI The URI of the archive
* @return A URI for accessing the specified file within the specified LHA
* archive
*/
+ (OFURI *)URIForFilePath: (OFString *)path inArchiveWithURI: (OFURI *)URI;
- (instancetype)init OF_UNAVAILABLE;
/**
* @brief Initializes an already allocated OFLHAArchive object with the
* specified stream.
*
|
|
|
|
|
|
|
|
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
* @return A new, autoreleased OFLHAArchive
*/
+ (instancetype)archiveWithStream: (OFStream *)stream mode: (OFString *)mode;
/**
* @brief Creates a new OFLHAArchive object with the specified file.
*
* @param IRI The IRI to the LHA file
* @param mode The mode for the LHA file. Valid modes are "r" for reading,
* "w" for creating a new file and "a" for appending to an existing
* archive.
* @return A new, autoreleased OFLHAArchive
*/
+ (instancetype)archiveWithIRI: (OFIRI *)IRI mode: (OFString *)mode;
/**
* @brief Creates an IRI for accessing a the specified file within the
* specified LHA archive.
*
* @param path The path of the file within the archive
* @param IRI The IRI of the archive
* @return An IRI for accessing the specified file within the specified LHA
* archive
*/
+ (OFIRI *)IRIForFilePath: (OFString *)path inArchiveWithIRI: (OFIRI *)IRI;
- (instancetype)init OF_UNAVAILABLE;
/**
* @brief Initializes an already allocated OFLHAArchive object with the
* specified stream.
*
|
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
- (instancetype)initWithStream: (OFStream *)stream
mode: (OFString *)mode OF_DESIGNATED_INITIALIZER;
/**
* @brief Initializes an already allocated OFLHAArchive object with the
* specified file.
*
* @param URI The URI to the LHA file
* @param mode The mode for the LHA file. Valid modes are "r" for reading,
* "w" for creating a new file and "a" for appending to an existing
* archive.
* @return An initialized OFLHAArchive
*/
- (instancetype)initWithURI: (OFURI *)URI mode: (OFString *)mode;
/**
* @brief Returns the next entry from the LHA archive or `nil` if all entries
* have been read.
*
* @note This is only available in read mode.
*
|
|
|
|
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
- (instancetype)initWithStream: (OFStream *)stream
mode: (OFString *)mode OF_DESIGNATED_INITIALIZER;
/**
* @brief Initializes an already allocated OFLHAArchive object with the
* specified file.
*
* @param IRI The IRI to the LHA file
* @param mode The mode for the LHA file. Valid modes are "r" for reading,
* "w" for creating a new file and "a" for appending to an existing
* archive.
* @return An initialized OFLHAArchive
*/
- (instancetype)initWithIRI: (OFIRI *)IRI mode: (OFString *)mode;
/**
* @brief Returns the next entry from the LHA archive or `nil` if all entries
* have been read.
*
* @note This is only available in read mode.
*
|