ObjFW  Check-in [711592a1c3]

Overview
Comment:OFFileManager: fileURLWithPath: to convert to URL
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 711592a1c307fe626cab890318388dadac5fa0729b34bb129146056f1e69b5cd
User & Date: js on 2018-03-11 11:27:15
Other Links: manifest | tags
Context
2018-03-11
12:35
OFString+PathAdditions: Split into per-type files check-in: c6930c5141 user: js tags: trunk
11:27
OFFileManager: fileURLWithPath: to convert to URL check-in: 711592a1c3 user: js tags: trunk
00:37
OFString: Move path handling into a category check-in: 7a488c3062 user: js tags: trunk
Changes

Modified src/OFFileManager.m from [65d0521303] to [74a0735e38].

184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
	return [OFString stringWithCString: buffer
				  encoding: [OFLocalization encoding]];
#endif
}

- (OFURL *)currentDirectoryURL
{
	OFMutableURL *URL = [OFMutableURL URL];
	void *pool = objc_autoreleasePoolPush();
	OFString *path;

	[URL setScheme: @"file"];

#if OF_PATH_DELIMITER != '/'
	path = [[[self currentDirectoryPath] pathComponents]
	    componentsJoinedByString: @"/"];
#else
	path = [self currentDirectoryPath];
#endif

#ifndef OF_PATH_STARTS_WITH_SLASH
	path = [path stringByPrependingString: @"/"];
#endif

	[URL setPath: [path stringByAppendingString: @"/"]];

	[URL makeImmutable];

	objc_autoreleasePoolPop(pool);

	return URL;
}

- (of_file_attributes_t)attributesOfItemAtURL: (OFURL *)URL
{
	OFURLHandler *URLHandler;

	if (URL == nil)







<

<
|
<

<
<
<
<
|
<

<
<
<
|
<
<
<
<

<
|







184
185
186
187
188
189
190

191

192

193




194

195



196




197

198
199
200
201
202
203
204
205
	return [OFString stringWithCString: buffer
				  encoding: [OFLocalization encoding]];
#endif
}

- (OFURL *)currentDirectoryURL
{

	void *pool = objc_autoreleasePoolPush();

	OFURL *ret;






	ret = [OFURL fileURLWithPath: [self currentDirectoryPath]];





	[ret retain];




	objc_autoreleasePoolPop(pool);

	return [ret autorelease];
}

- (of_file_attributes_t)attributesOfItemAtURL: (OFURL *)URL
{
	OFURLHandler *URLHandler;

	if (URL == nil)