ObjFW  Diff

Differences From Artifact [d0b4f286d3]:

To Artifact [ed7fc3801b]:


166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
+ (instancetype)archiveWithURI: (OFURI *)URI mode: (OFString *)mode
{
	return [[[self alloc] initWithURI: URI mode: mode] autorelease];
}

+ (OFURI *)URIForFile: (OFString *)path inArchive: (OFURI *)archive
{
	OFMutableURI *URI = [OFMutableURI URI];
	void *pool = objc_autoreleasePoolPush();
	OFCharacterSet *characterSet = [OFCharacterSet
	    of_URIPathAllowedCharacterSetWithoutExclamationMark];
	OFString *archiveURI;

	path = [path
	    stringByAddingPercentEncodingWithAllowedCharacters: characterSet];
	archiveURI = [archive.string
	    stringByAddingPercentEncodingWithAllowedCharacters: characterSet];

	URI.scheme = @"of-zip";
	URI.percentEncodedPath = [OFString stringWithFormat: @"%@!%@",
							     archiveURI, path];

	[URI makeImmutable];

	objc_autoreleasePoolPop(pool);

	return URI;
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}








<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<







166
167
168
169
170
171
172





173














174
175
176
177
178
179
180
+ (instancetype)archiveWithURI: (OFURI *)URI mode: (OFString *)mode
{
	return [[[self alloc] initWithURI: URI mode: mode] autorelease];
}

+ (OFURI *)URIForFile: (OFString *)path inArchive: (OFURI *)archive
{





	return OFURIForFileInArchive(@"of-zip", path, archive);














}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}