@@ -46,21 +46,24 @@ if (self == [TarArchive class]) app = (OFZIP *)[[OFApplication sharedApplication] delegate]; } + (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream + mode: (OFString *)mode { - return [[[self alloc] initWithStream: stream] autorelease]; + return [[[self alloc] initWithStream: stream + mode: mode] autorelease]; } - initWithStream: (OF_KINDOF(OFStream *))stream + mode: (OFString *)mode { self = [super init]; @try { _archive = [[OFTarArchive alloc] initWithStream: stream - mode: @"r"]; + mode: mode]; } @catch (id e) { [self release]; @throw e; }