@@ -19,29 +19,26 @@ OF_ASSUME_NONNULL_BEGIN @class OFString; @class OFStream; +@class OFTarArchive_FileReadStream; /*! * @class OFTarArchive OFTarArchive.h ObjFW/OFTarArchive.h * * @brief A class for accessing and manipulating tar archives. */ @interface OFTarArchive: OFObject { -#ifdef OF_TAR_ARCHIVE_ENTRY_M -@public -#endif OFStream *_stream; -@protected enum { OF_TAR_ARCHIVE_MODE_READ, OF_TAR_ARCHIVE_MODE_WRITE, OF_TAR_ARCHIVE_MODE_APPEND } _mode; - OFTarArchiveEntry *_lastReturnedEntry; + OFTarArchive_FileReadStream *_lastReturnedStream; } /*! * @brief Creates a new OFTarArchive object with the specified stream. * @@ -100,16 +97,23 @@ * @brief Returns the next entry from the tar archive or `nil` if all entries * have been read. * * This is only available in read mode. * - * @warning Calling @ref nextEntry will invalidate all streams returned by the - * previous entry! Reading from an invalidated stream will throw an - * @ref OFReadFailedException! + * @warning Calling @ref nextEntry will invalidate all streams returned by + * @ref streamForReadingCurrentEntry entry! Reading from an + * invalidated stream will throw an @ref OFReadFailedException! * * @return The next entry from the tar archive or `nil` if all entries have * been read */ - (OFTarArchiveEntry *)nextEntry; + +/*! + * @brief Returns a stream for reading the current entry. + * + * @return A stream for reading the current entry + */ +- (OFStream *)streamForReadingCurrentEntry; @end OF_ASSUME_NONNULL_END