Differences From Artifact [d9a5ab9e23]:
- File src/OFTarArchive.h — part of check-in [0c5035dd3f] at 2017-08-05 15:22:53 on branch trunk — OFTarArchive: Add write and append support (user: js, size: 4344) [annotate] [blame] [check-ins using]
To Artifact [0314df0a93]:
- File
src/OFTarArchive.h
— part of check-in
[c404c33cf1]
at
2017-08-05 18:00:22
on branch trunk
— OFZIPArchive: Don't require an OFSeekableStream
This is now only necessary for reading and appending. (user: js, size: 4382) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
25 26 27 28 29 30 31 |
/*!
* @class OFTarArchive OFTarArchive.h ObjFW/OFTarArchive.h
*
* @brief A class for accessing and manipulating tar archives.
*/
@interface OFTarArchive: OFObject
{
| | | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
/*!
* @class OFTarArchive OFTarArchive.h ObjFW/OFTarArchive.h
*
* @brief A class for accessing and manipulating tar archives.
*/
@interface OFTarArchive: OFObject
{
OF_KINDOF(OFStream *) _stream;
enum {
OF_TAR_ARCHIVE_MODE_READ,
OF_TAR_ARCHIVE_MODE_WRITE,
OF_TAR_ARCHIVE_MODE_APPEND
} _mode;
OF_KINDOF(OFStream *) _lastReturnedStream;
}
/*!
* @brief Creates a new OFTarArchive object with the specified stream.
*
* @param stream A stream from which the tar archive will be read.
* For append mode, this needs to be an OFSeekableStream.
* @param mode The mode for the tar 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 OFTarArchive
*/
+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode;
#ifdef OF_HAVE_FILES
/*!
* @brief Creates a new OFTarArchive object with the specified file.
*
* @param path The path to the tar archive
|
| ︙ | ︙ | |||
66 67 68 69 70 71 72 | #endif /*! * @brief Initializes an already allocated OFTarArchive object with the * specified stream. * * @param stream A stream from which the tar archive will be read. | | | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | #endif /*! * @brief Initializes an already allocated OFTarArchive object with the * specified stream. * * @param stream A stream from which the tar archive will be read. * For append mode, this needs to be an OFSeekableStream. * @param mode The mode for the tar file. Valid modes are "r" for reading, * "w" for creating a new file and "a" for appending to an existing * archive. * @return An initialized OFTarArchive */ - initWithStream: (OF_KINDOF(OFStream *))stream mode: (OFString *)mode OF_DESIGNATED_INITIALIZER; #ifdef OF_HAVE_FILES /*! * @brief Initializes an already allocated OFTarArchive object with the * specified file. * |
| ︙ | ︙ |