ObjFW  Diff

Differences From Artifact [7f0444f958]:

To Artifact [696b6c1432]:


173
174
175
176
177
178
179

180
181
182
183
184
185
186


187
188
189
190
191
192
193
+ fileWithFileDescriptor: (int)fd_
{
	return [[[self alloc] initWithFileDescriptor: fd_] autorelease];
}

+ (OFString*)currentDirectoryPath
{

	char *buf = getcwd(NULL, 0);

	@try {
		return [OFString stringWithCString: buf];
	} @finally {
		free(buf);
	}


}

+ (BOOL)fileExistsAtPath: (OFString*)path
{
	struct stat s;

	if (stat([path cString], &s) == -1)







>



|



>
>







173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
+ fileWithFileDescriptor: (int)fd_
{
	return [[[self alloc] initWithFileDescriptor: fd_] autorelease];
}

+ (OFString*)currentDirectoryPath
{
	OFString *ret;
	char *buf = getcwd(NULL, 0);

	@try {
		ret = [OFString stringWithCString: buf];
	} @finally {
		free(buf);
	}

	return ret;
}

+ (BOOL)fileExistsAtPath: (OFString*)path
{
	struct stat s;

	if (stat([path cString], &s) == -1)