@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2023 Jonathan Schleifer + * Copyright (c) 2008-2024 Jonathan Schleifer * * 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 @@ -12,11 +12,10 @@ * 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 @@ -37,10 +36,12 @@ OFLHAArchiveEntry *_Nullable _currentEntry; #ifdef OF_LHA_ARCHIVE_M @public #endif OFStream *_Nullable _lastReturnedStream; +@protected + bool _hasWritten; } /** * @brief The encoding to use for the archive. Defaults to ISO 8859-1. */ @@ -68,12 +69,12 @@ * @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. + * @brief Creates an IRI for accessing 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 @@ -150,12 +151,12 @@ * entry are ignored. * * @note The returned stream conforms to @ref OFReadyForWritingObserving if the * underlying stream does so, too. * - * @warning Calling @ref nextEntry will invalidate all streams returned by - * @ref streamForReadingCurrentEntry or + * @warning Calling @ref streamForWritingEntry: will invalidate all streams + * returned by @ref streamForReadingCurrentEntry or * @ref streamForWritingEntry:! Reading from or writing to an * invalidated stream will throw an @ref OFReadFailedException or * @ref OFWriteFailedException! * * @param entry The entry for which a stream for writing should be returned